Adding )LIMIT 1 to WHERE NOT clause