UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JY0NYDSZjv+xL5cPehgrlkxi33l1mxrKovJZs9bW+VE='
WHERE
key_id = '6abfd8571c18b7244f1fd89ba8226721c32cbaede0396ed9174228c199cee6d2'
AND (
token = 'JY0NYDSZjv+xL5cPehgrlkxi33l1mxrKovJZs9bW+VE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)