Matcha is a very fine and delicate, it has mellow aroma and pleasant sweetness. On the other hand, it's quite "fragile" and will degrade over time. Matcha does not "spoilt" or "expired", it will only degrade and the taste become bitter and color turn brown, but you still can consume it.
There are 5 enemies of matcha : Heat, Humidity, Air, Light, and Smell. Store your matcha in a place that away from these 5 elements.
Picture below shows comparison between Shizuoka matcha expose to air for 3 days (right) and fresh Shizuoka matcha (left).
Matcha expose to air will get oxidized pretty quick, make sure you store your matcha in air tight container.
For unopened matcha packaging, matcha can be stored for a year to 1.5 year at room temp or lower temperature. If you don't plan to use it for quite a long time, keep it in the fridge.
For opened package/can, consume it within 3 months for it's best taste. If you plan to keep it for long time, keep it in the freezer with air tight container, but remember to open the package/can only after it warm up to room temperature.