UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6BX65FrFKNccy7+0gtl4MnHc55hvYcJjBrO5WiW8A/E=' 
WHERE 
  key_id = 'fa99defe6f2466d32def7112a60ff13e98acdfba6a63081746663fe5e96164f6' 
  AND (
    token = '6BX65FrFKNccy7+0gtl4MnHc55hvYcJjBrO5WiW8A/E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027