The days of 20 years at the same company are gone like Enron.
There are a few different strategies around how long you should stay at a company. Stay until you get above your desired salary threshold, stay until you get a better offer, stay until you become leadership, leave for the startup that's about to launch an IPO, etc.
Star the discussion, what are you thinking? It's anonymous, so what's your plan?