UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nEpRYq41LaMtYt26KA/JDs7xO24ZWw8MPiZIWuskhlw='
WHERE
key_id = '37026d3bc20a4dadb8836437b7adf745d991758b743ef1c4482508d2b69c0172'
AND (
token = 'nEpRYq41LaMtYt26KA/JDs7xO24ZWw8MPiZIWuskhlw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)