They do. N95 masks have a 10 year shelf life. You can argue about the usefulness of that shelf life (it's been done to death), but it's there, and when the pandemic hit loads of governments were faced with expired masks.
https://multimedia.3m.com/mws/media/869238O/3m-health-care-p...