Donkeys live for 30 to 50 years, while an American's life expectancy at birth is around 80. Relative to the lifespan of an American human, a donkey year is, at a minimum, around 2.67 years. In informal usage, the expression "donkey's years" indicates an extremely long period of time.
Although a donkey year is longer than a human year, the expression "donkey's years" probably has nothing to do with a donkey's lifespan. According to Dictionary.com, the origin of the phrase is from the use of the phrase "donkey's ears" in rhyming slang. Once people generally forgot about the origin of the expression, the word "years" replaced the word "ears."