I kept a stainless Mini on my 39 footer for years. But, that was in a express cruiser cabin that was more like a condo, than a locker on a center console.
If kept in "condo-like" conditions, not exposed to the elements, it's no different than keeping it in a non-conditioned space like a garage. Any well- oiled rifle in a protective case should be fine.
If you're talking about an open boat like a center console or cuddy, where it's gonna be kept in a locker and really exposed to the salt air, different story.
I'd only take it aboard when using the boat, and take it off when I stepped ashore.
I've owned boats and lived on the water on the Gulf for over twenty years, the salt air will take a toll on everything.