UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sScnGVCUtXfQsZ/dkQ/JYTDjXfq7+xLSodeO8J5PSh4=' 
WHERE 
  key_id = '94d58ddaa1eb936b37ca7060f015a2dc9b87512b4eac56b8bddee71529e6daa6' 
  AND (
    token = 'sScnGVCUtXfQsZ/dkQ/JYTDjXfq7+xLSodeO8J5PSh4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015