100% silicone sealant (the kind for windows, trim, etc). Just make sure they're no additives or mold inhibitors. The only issue, for me at least, is that it's super goopy. I was looking for a smooth sealant rather than a super thick toothpaste sealant lol.
Or if you can find it, the sealant used for outdoor ponds. We got it from Home Depot I think, and haven't had any dead fish yet, so it should be ok for reptiles. It sure what brand it was though.
I haven't personally used it, but polyurethane should do the trick. I'm not sure if there's any leaching though from the continual submersion. I'd take a look at tree/dart frog forums for additional ideas. They're much more sensitive, so if there's a product that works well in those setups, it should be perfect for snakes.