UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xSLzU/8S8/ga9HhrjBNG8IiW+u5oK6rnHLzjDaPgc3M='
WHERE
key_id = '0b5357b99a1f190e3879ff8ad1f59a66cad1ab4eb77b821636b59fb80dd5f68a'
AND (
token = 'xSLzU/8S8/ga9HhrjBNG8IiW+u5oK6rnHLzjDaPgc3M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)