UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SM7XHMPaGq0I7XIV/V8ptqP1m8RlyGUBOsqS6WwQFIY='
WHERE
key_id = '41970e298936b401cb5c95fb1fa5e8a9e1fd9f2dfb1c730e873d41978a2d08e1'
AND (
token = 'SM7XHMPaGq0I7XIV/V8ptqP1m8RlyGUBOsqS6WwQFIY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)