UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+VkxBLRt9zZJxz5vmfiZ6+RYex3rZgI83FVbpJvd2v0='
WHERE
key_id = '9c760c64bdde2dece737ad52cb67f4532f47d380f9a93ea14b15d122b64d2cb3'
AND (
token = '+VkxBLRt9zZJxz5vmfiZ6+RYex3rZgI83FVbpJvd2v0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)