UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v6zunJV5l7EoPWkVUR4xhayu1N3w5E88G6qD1ET4fuU='
WHERE
key_id = '626fe94cc919e78cef8c0b4d5b4acbaa0e17c30ab4f3f30869d1b16212f89dba'
AND (
token = 'v6zunJV5l7EoPWkVUR4xhayu1N3w5E88G6qD1ET4fuU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)