UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JhE/JBWiwTMkc7J9ViDvOJhWGxJy4aUJ9IqoLeWvhnE='
WHERE
key_id = '5c250f7717dbdd5a73b6da86b10ff21b356aa514a7e8b87a27d83cdda17e575f'
AND (
token = 'JhE/JBWiwTMkc7J9ViDvOJhWGxJy4aUJ9IqoLeWvhnE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)