There should not be any beer in your gas line at all. The gas check valve helps with this, but unless you are over-filling your keg to the point it is over the gas side dip-tupe (Which I have no idea why there is even a short dip tube there on corny kegs) you should only have gas that would go back to the lower pressure in the tubing. This is another reason I love Sanke over Corny, but that is a whole other debate and personal preference is completely ok no matter which style you choose. Your keg should not be at 30-40 psi once the temperature has dropped to serving pressures. For example from the Beersmith software: 1st say you were going to force carbonate your pale ale at 2.3 volumes after your crash cooling (so the beer is nice and cold and readily accepts gas into solution faster) and your beer at this point is 35*F. To get 2.3 volumes of CO2 into that temperature beer would only require 7.72psi on your regulator. naturally carbonating you would of course be higher, so... 2nd lets say you wanted 2.3 volumes in your pale ale at natural carbonation temperatures (same as fermentation or even higher if you want) at say 67*F. That would mean you would want your regulator or your spunding valve (depending on if you wanted to naturally carbonate or force carbonate) set to 23.96 psi. After you have finished carbonating, either naturally or forced because it doesn't matter in this example, you will drop the temperature of your beer down to serve. At which point lets say you are serving at 40*F-45*F. The internal pressure of your keg and beer is now no longer 23.96 psi, but has dropped due to temperature to 10.10 psi - 12.54 psi (relative to the 40-45*F). This is right at the pressure you were talking about forcing beer back up your gas line. I could see if your keg at that low a temperature was carbonated to the higher levels of 30-40 psi how it would be forced back into the gas line, but that would be beer as fizzy as soda pop.
I think you are missing the point that the keg pressure drops or can be raised with nothing more than temperature, without adding or taking away any pressure that was already there. Volume is volumes, but psi will change with temperature... doesn't mean you have fizzier or flatter beer because of psi change, only with CO2 volumes changes. Hope that helps clear things up a little bit. Oh, and I chose a pale ale because the serving pressures are right about what you should carbonate one at, so the keg pressure should be very close to serving pressure and not cause any problems. This is the reason lighter American lagers are served so cold, to keep the serving pressure lower as well as allowing for a more carbonated beer not going flat from such low serving pressures.