Never buy expired products. If you see it on shelf ,report it and or return it showing till receipt if you ended up buying it in first instance .
If it's the same day you bought and saw expiration date has passed you.might be able to return it. Products like cheese as you said it's just from a corner, just cut it off and use it if it doesn't smell bad.
Thanks! Your answer is awaiting moderation.