Once a tin is open
Plan to finish a 30 to 40 gram tin within 60 to 90 days of opening. After that the color dulls and the aroma flattens even if the seal is good. Marukyu Koyamaen and Ippodo both print best by dates that assume the tin stays unopened.
Where to keep it
Keep matcha airtight, away from light, heat, moisture, and strong odors. A sealed tin inside a cabinet works well. Refrigeration is acceptable if the container is fully airtight, but bring it back to room temperature before opening so condensation does not form on the powder.
Buying habits that help
Buy smaller tins more often rather than one large tin. Note the open date on the lid so you can track the freshness window. If you only drink lattes, you can stretch the timeline a little, but plain usucha will reveal an aging powder very quickly.