UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GeP/Qu+ro/3UeWXjeiXssUqUvSllQ8Q6ajXOi6nIGPI='
WHERE
key_id = '351d7a9b6e1a6fdd612a5a61433082552015bc957a34c22a3811f3cfef69e536'
AND (
token = 'GeP/Qu+ro/3UeWXjeiXssUqUvSllQ8Q6ajXOi6nIGPI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)