Ok, definitely do the water change, but I’d also recommend lowering your salinity to 1.027 max (try to keep it between 1.025-1.027). If it’s 40 gallons, I would add about 16-32 oz of rodi water every 4-6 hours till your salinity is around 1.025.
after that I would look at getting some lanthinum chloride (phosphate rx), and dose that within the sump of your tank (drip it into your filter socks or filter floss that acts as the mechanical filtration for the return water from the tank. I would dose the phosphate rx at a rate of 6 drops on the first day, then the next day make sure your phosphates haven’t dropped by more than 0.2ppm (if it has, drop your dosage to half, if it only lowered the phosphate by less than 0.05ppm, then double the dosage). Dose the lanthanum daily until your phosphates are below 0.08 (0.03 is ideal, but will be difficult to maintain with a 40 gallon tank).
as and alternate to the lanthanum, you can continue to do 5-10 gallon water changes daily until your phosphate is under 0.08, but, with the water changes you will be lowering your nitrates as well.