Pure guess, but could it be a spiny oyster, Spondylus barbatus? It is actually a type of scallop and not an oyster at all. ..... Filter feeder, harmless & nice addition if what you have actually is one.
A scallop should have a row of "eyes" on either side of the mantle as seen in the picture below on a different species of scallop. The "eyes" are the row tiny black spots just below the shell. Can you see any on yours?
I don't see any eyes, and it definitely looks more like either the jewel box clams (got quite a few of those and some other bivalves) or spiny oysters etc. so am going to go with it being one of those.