UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nGTD8A6bF1KZ2nsSDR+/j+SBuj0G26zqBFVUnDWN7IQ='
WHERE
key_id = '06491d99ed8f002a8c4a2a8c7a35ce45b3abf9dab292e20f42faad3b69bd7a93'
AND (
token = 'nGTD8A6bF1KZ2nsSDR+/j+SBuj0G26zqBFVUnDWN7IQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)