In my experience, generic usb keyboards don't last too long before, like your keyboard, keys start to just randomly stop working. I use my keyboard a lot, which doesn't help. My mum's keyboards lasted longer, but she doesn't use them as much. A while ago I started using cheaper Logitech keyboards, which were a huge improvement.
Not sure what you classify as affordable, but my current keyboard, the Microsoft Sidewinder X6, is very good. I also recommend the Logitech G15, which has a great build quality and a number of my friends have had them for many years without any issues. If you're not a big PC gamer, though, these two are probably a bit overkill.
Basically, you can't go wrong with Logitech, so I'd recommend you find a Logitech keyboard in your price range and go with that.