UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NoMcbZMlN6aW7qkYI6U4UTbs2yQGOGl2XkISCNL+ihE='
WHERE
key_id = '292c5d0bcbf86d4fdeb8260c680ec0af858ce452db9d3ec4a01a0bf87187dac4'
AND (
token = 'NoMcbZMlN6aW7qkYI6U4UTbs2yQGOGl2XkISCNL+ihE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)