Solid state electronics don't "wear out". Failures are very infrequent and basically random (assuming no electrical, mechanical, or thermal abuse).
On average, 2 years should be no problem. But if the design is critical, such as life-support, or if it's going into space where it can't be repaired/replaced, you have to take extra precaustions, because failures are random and there is a slim possibility that you get a failure after 2 days, or 2 weeks...
Take a look at
this. (That's just for the chip. Of course, there are more parts on the Arduino board, and you might be adding some parts. If you use 100 parts, life-expectancy (MTBF) is 1/100th.)
I do have an Arduino that "went bad" after a couple of weeks... The chip is running, but the bootloader doesn't work. (I don't know if the bootloader somehow got corrupted, or if the serial-chip "went bad" or somehow got burned-out.)
I built a few projects with a different microcontroller about 15 years ago, and they still work fine. One is a car alarm that's been running 24/7 for more than 15 years... even when it's not armed. The only time the microcontroler & software-loop haven't been running is when the battery was dead!
Mechanical parts (switches, relays, motors) and connectors can wear-out and connections can become corroded. Electrolytic capacitors can have lifetimes less than most other "electronics". And of course, vacuum tubes age, deteriorate, and wear-out.