I think I've also read that if you breed your corns a lot, their lifespans may not be as long as ones who don't since breeding takes quite a toll on the snake's body (mostly in females).
And yeah, 20+ years is not unusual for a corn to live in captivity.