UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JRxknQS/d9rJS/xWfvEMTtjAEP8kBSg7PdJt9oNETNQ='
WHERE
key_id = '82c8755e3c2f24dcc50da98cdaa794bf2a068a48c767f55900089aeac0224b38'
AND (
token = 'JRxknQS/d9rJS/xWfvEMTtjAEP8kBSg7PdJt9oNETNQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)