How long does a wind turbine work for?

Onshore wind turbines are usually decommissioned after generating electricity for 20-25 years. Offshore, the life-span is usually longer, 30 years or more.