So, as a rule of thumb, the solar panel loses approximately 1% per year. So after 30 years it's generating around 70% of rated capacity.
At that (or any earlier or later) point one could replace the panels. That's really cheap to do, and can be done with more-or-less unskilled labor.
If you are space-constrained (like your residential roof) then you'll likely do it earlier.
If you are a commercial producer, sitting in a desert somewhere, it'll likely be better to just "plant another field" next door. Keep the 70% (it's free), and bolster capacity by adding more panels, not replacing old ones.
And this is before we take into account places where the ecology under the panels has changed and become more valuable in its own right.
So 25 years from now, or maybe 10 years from now, it might pay to replace panels. Which may in turn lead to very cheap 75% 2nd hand panels becoming widely available.