it's not necessary to have the product last 30 years. E.g. in car industry, tons of code is carried over in new products. If it works and does the job, why change it?
If the code is tied to a physical process, this will likely not change.
What changes is the sensor, it's transfer curve or the mean to communicate the reading, but how to treat the value does not change so much over time.