Rice keeps for 20 years, no problem. Dried bean can last a long time too. It's better than having no food to eat. lol
Properly stored dried beans stay safe to eat indefinitely, but start to lose vitamin content after 2 to 3 years of storage. After 3 to 5 years, the taste starts to gradually alter for the worse, and your baked beans might not be as good as you're used to.11 Apr 2021
Milled Rice (e.g., white rice) โ If stored properly, milled rice will keep almost indefinitely on the pantry shelf. Whole Grain Rice (e.g., brown rice) โ Because of the oil in the bran layer, this rice has a shelf life of approximately six months