Tl;dr, artificially, yes. Farm animal lifespans have decreased. Naturally? I doubt it.
The average lifespan of a cow is usually 15-20 years (Cow Longevity Conference, 2013), though a website that claims to be a farming sanctuary claims that cows can live for over 20 years. From what I've read, an herbivore/carnivore lifestyle doesn't really affect lifespan. Tortoises and whales are some of the longest-lived herbivores on the planet, likewise for birds like parrots or ravens. Humans live from 65-80 years on average depending on environmental conditions and genetics--however, gorillas (herbivores) and chimps (mainly herbivores but they do eat meat/insects) live 35-40 years in captivity. So diet doesn't really measure longevity. This doesn't mean not avoiding salt, sugar, and trans fats won't do any good. It would but body weight and BMI are better measurements of overall health and eventually lifespan.
Most cows that are raised for meat are usually killed at around 1000-1200 pounds (453-544 kilograms), or about 18 months of age with the conventional methods of feeding (corn, vitamins, prophylaxis antibiotic regimens). Diary cows are slaughtered after 5 years, once they are decided to be "spent."
So, to answer your question. Lifespan of farm animals have decreased artificially because humans decide when they live and when they die. Humans also determine which traits to continue breeding, so a trait to gain weight might be detrimental for long-term health but evolutionary rewarding for short-term/fast growth.
References:
http://www.milkproduction.com/Library/Scientific-articles/Management/Cow-longevity-economics-The-cost-benefit-of-keeping-the-cow-in-the-herd/
https://www.farmsanctuary.org/learn/factory-farming/dairy/
https://chimpsnw.org/2013/03/how-long-do-chimpanzees-live/