Treat with flatworm exit by Salfert. You will need to suck out as many of the flat worms as possible before hand (when they die they release toxins), do a water change after and run carbon.
In your 30G you probably have about 20 Gs of water. You may wish to consdier a 50% (10G) change out but ensure that salinity and temp are matched exactly.