Captive longevity is 20 to 30 years , with rare accounts of over 40 years , making them a long-term commitment as a pet . Captive life expectancy is 20 to 30 years , with rare accounts of over 40 years , making them a long-term commitment as a pet .