3M recommends a 3 oz tube of 3M 4000UV be used within 24 hours of opening. I've found it stays somewhat pliable for almost a week as long as you seal it tightly. 5200FC cures in similar time as 4000. Standard 5200 takes much longer. FWIW (in terms of RV use), 4000 is much more UV resistant than 5200.
As JSP mentioned, store it in a freezer. I have all my sealant stored in my "bait" freeze, some as old as 5 yrs. Never a problem unscrewing the cap. Might have to prick the tip with a nail but then it'll flow after squeezing the tube.