UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TLCYsbdB1H1JwyoVPuJSWTYDBbQ3INo+iNW6U28FO1E='
WHERE
key_id = '3444ad8c861782e52991e37641049ecaa8e73d82b8d75d6c366ca56dd5fe8c36'
AND (
token = 'TLCYsbdB1H1JwyoVPuJSWTYDBbQ3INo+iNW6U28FO1E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)