I replace them every year at the start of riding season. They are just cheap insurance. Even if one does go bad I use the bypass feature every now and then so I don't forget my code and how to use it.
Buy them from Amazon and you can get packs of them extremely cheap. Just buy from Amazon directly and a name brand as you don't want the cheap chinese knockoffs. I replaced both of mine at about 1.5 years.
I was thinking of picking up a package of spares and just keeping them in my saddlebag should that day ever come. They're pretty cheap, I think 1/year would be on the safe side.
I just ordered new ones for my 2012, i got a 10 pack on amazon for $6, i know i dont need that many but i have plenty of friends that could use them and they were same price as 2 lol