UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OdvlPI997NFUpOjPUZRLzJMez4W7taN9M+JOJ/cKylg='
WHERE
key_id = '94f93d08cc26c1c83e9f8a439b5b9db54d4250b7bfb3fbda680c06222ff7b233'
AND (
token = 'OdvlPI997NFUpOjPUZRLzJMez4W7taN9M+JOJ/cKylg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)