UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2VBSGt94sJsg24Ssdn+76e/mkWisKWuIBQrbu8bkNAs='
WHERE
key_id = 'ee5626b3f7ad6187b1bdc2a5abec016b0b73b3431fcac0094d135f417bbc15a9'
AND (
token = '2VBSGt94sJsg24Ssdn+76e/mkWisKWuIBQrbu8bkNAs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)