I don't know of any lock that will survive long in Salt water even a stainless steel one. There are a few metals made to truly withstand salt. I'm pretty sure they don't make locks from them.
Agreed, for tumbler lock designs anyway. Springs and cylinders would be very vulnerable. Another factor that I didn't see mentioned is marine growth, which would jam most any small mechanism and fill the keyhole in a matter of weeks.
You might be able to come up with a 3D printed mechanism that used a magnet to disengage a simple latch or dog. The inside of the box/housing could be filled with distilled water or fish oil to protect the works from corrosion, growth, and particulate contamination.