Sun screen supposedly does have a shelf life...not sure what the average would be. I think bottles are stamped with an expiration date.
I can tell you what not to use. Many years ago at the age of 12, on my first trip out West, skiing at A-Basin, I thought I would help my chapped lips out and put Vaseline on them. They literally blistered. To about 4 times their normal size. Not fun at all. Vaseline actually amplifies the sun. Who knew. Not me, obviously.
Keep in mind as you ascend in altitude you need to up the SPF. The more intense sun and thinner atmosphere all contribute to easier burning. If you use an 8 at sea level you probably want to aim for maybe a 12+ in the mountains. That said this really applies more as you get to places like CO.