UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wyDcqh8+rlxIqoBMM0jNxXPus2vjMkY/OSgrAEtgmzc='
WHERE
key_id = '61ec2d3d6fdd60f679618234ad9caa5c163beb725287c95e78054ea1c9a11e59'
AND (
token = 'wyDcqh8+rlxIqoBMM0jNxXPus2vjMkY/OSgrAEtgmzc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)