UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DfrSxqtn/bBwJqvyfKV9JuBOlc+kKgwP8rW9S2DUX8M='
WHERE
key_id = '3570235771b3974db97552c8e52970cef469129ad74f41c895ac62474a600efa'
AND (
token = 'DfrSxqtn/bBwJqvyfKV9JuBOlc+kKgwP8rW9S2DUX8M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)