UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qtW5cK9jxpX9t6zHC44Vt+HvGvHhTW96GVRifmcAawc='
WHERE
key_id = '5b0a7ee04975da0ede5c75eb2c25715ef074e2bdfd2904870faaae2d0bc308e5'
AND (
token = 'qtW5cK9jxpX9t6zHC44Vt+HvGvHhTW96GVRifmcAawc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)