UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mY/UyHRFJXyNprpNxCYzoMmL4xh0tc+9TuHvhwtlCvU='
WHERE
key_id = '2937f6940455645db209808cea784f7f412aefcf79f9e56db0415e1aa08de8bd'
AND (
token = 'mY/UyHRFJXyNprpNxCYzoMmL4xh0tc+9TuHvhwtlCvU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)