So to review.....

40 gallon electric hot water tank

water pressure from PRV is set to 40 psi

2 gallon expansion tank installed at cold water supply side of water heater

air charge for expansion tank is matched to water pressure of 40 psi

T&P is rated at 150 psi and engages

..... sounds like thermostat(s) in water heater are not working and allowing the heating elements to run full on constantly. It's over heating and causing thermo expansion which is also overwhelming the capacity of the expansion tank ..... building pressure all the way to the PRV increasing the preesure inside the home.

Just a thought.