If it's cool and DRY it can be stored a long time.
Usually it's best to use it within 6 months.
When stored in grain bins, it's usually treated with an insecticide, and humidity is carefully controlled
Whole grain keeps better than pellets or cracked grains