You can eat rice that is 2 years out of date.
Rice is okay and safe to eat well past it's expiration date as long as the rice has been stored properly and has not absorbed any moisture and become moldy.
I've had rice that I had stored and forgot about that was 5 years past it's date and it was just fine and I cooked it up and added it with beans.
Not all food is actually bad, just because it's reached it's use by date or expiration date or even if it's past the use by date or expiration date.
Dried goods like rice and beans for example can last years as long as they are stored properly.
Just check the rice or even beans or other dried goods that have been stored past their use by date or expiration date for any signs of mold or bad smells or bugs.
If there's no mold, bad smells or bugs or anything else bad in the rice, beans or other dried goods, the rice, beans and other dried goods are safe to eat.
Now for foods like milk, yogurt and other dairy and eggs that are past the expiration date or expired, those can be bad and should be thrown out.
But many dried goods can last and be safe to eat well past their expiration ate.
Even canned goods and canned meats can be safe to eat well past expiration date.
If you're in doubt, throw it out, but most often the rice and other dried goods and canned goods are very safe to eat.
If I have doubts about a food being safe to eat, I simply throw it out as it's not worth the risk.
But if it seems good than I will cook it and eat it.
For meats as long as they are frozen, they can also last for a few years or even a bit longer past expiration or use by date as long as they remain frozen.
Although the longer the meats are frozen the less fresh they become and the taste and texture of the meats can change.