UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+A2Y4ApWNVf5IvxHZf1SVNGE4bKDuj4xFhKCEyYA/SU=' 
WHERE 
  key_id = '99a9040f6af1427c9b6ac6c74ef8f7ed861c7adba1292cb10b13a30efba10c5d' 
  AND (
    token = '+A2Y4ApWNVf5IvxHZf1SVNGE4bKDuj4xFhKCEyYA/SU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017