UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7XAsRF3JTiSXb4l05ZBEahu1h97OV/aGnUWO3z+8ytk=' 
WHERE 
  key_id = '064aba9d829a4d45b91222c88601fa449bf985b04ac170c5c3c5ebd4b3bcb491' 
  AND (
    token = '7XAsRF3JTiSXb4l05ZBEahu1h97OV/aGnUWO3z+8ytk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030