UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/jvDQ0XfeIe0JpxyAQWWsqMFCj18yVH/85A97BN0lm4=' 
WHERE 
  key_id = 'cdcfc7e5b63d17ef8f0db091d04fdc7bb8aca06f947f0723cc7db790f185df6b' 
  AND (
    token = '/jvDQ0XfeIe0JpxyAQWWsqMFCj18yVH/85A97BN0lm4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025