UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'AIzOiongJRms26WKjOrS3JPQaQyM9+Tv6+tLhrDCCDk=' 
WHERE 
  key_id = 'd172b3556729d0af37eb1ef4959e557553485407e082199cd06df9bf15f68d53' 
  AND (
    token = 'AIzOiongJRms26WKjOrS3JPQaQyM9+Tv6+tLhrDCCDk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042