Canned mushrooms can last up to 10 years and sometimes longer.
When the mushrooms are in the can and sealed and never have been opened the canned mushrooms have a long shelf life.
However once you open the can of canned mushrooms then they will last for up to a week in the refrigerator.
If you open a can of mushrooms be sure to eat or use the canned mushrooms within a few days to a week of opening the can of mushrooms.
Bacteria can grow on the mushrooms once the can of mushrooms is opened even when refrigerated.
You can also put the mushrooms in a freezer bag and then freeze the mushrooms.
The mushrooms when frozen will last up to a year.
I've had canned mushrooms and other canned foods that I've forgot about at the back of my pantry that were 10 years old and they were still good.
As long as the can is not bulging, rusty or has any holes in the can of mushrooms or other can food the food can and will remain safe to eat well past the use by date.