In my country we have red tide alerts.
https://www.bfar.da.gov.ph/redtideI squeeze drops of lemon or dunk it in some apple cider vinegar or any vinegar for that feel of cleanliness.
Your taste buds are your friend. If it stinks or tastes bad or tastes dirty individually, spit it out.
I eat oysters individually so I can taste them if they are good or not.
In our markets when they sell oysters in their shell, it is understood they are ALIVE, do not buy them in the shell dead.
Do not "clean" live oyster outer shells by scrubbing out the mud, they get nutrition there that keeps them alive.
Eat immediately while they are alive, don't let them die on you.
FYI I eat oysters on a regular basis, once or twice a week. They are relatively cheap where I live.