Bad mushrooms can sometimes become toxic if the mushroom is really bad.
Although it's highly unlikely that you will become poisoned from the store bought mushrooms even when they are bad.
But still you can get ill such as get an upset stomach, abdominal pain, diarrhea etc or simple food poisoning from eating bad mushrooms.
If you have bad mushrooms you should throw them out to avoid getting sick.
When mushrooms have gone bad the bad mushrooms will usually develop a sticky/slimy surface and get darker in color.
If you notice any of the above signs of the mushrooms being bad or they smell bad throw them out and do not eat them.
Mushrooms once opened should last a week in the refrigerator and if the canned mushrooms remained sealed they can last as long as a few years and sometimes longer.