Hello Ahilgaz,
You stated the problem is with multiple cards, the problem is intermittent, and the card's switch is unlocked. I think you may have just what you suggested, the switch in the camera that detects the notch in the card is intermittent. When I had my K110D apart I did not look at that switch, but I was not impressed with the way the door open switch operates. That switch is on the circuit board. Which means:
The door slides on the case. The case mounts on the chassis. The chassis supports the board. The board supports the switch. You can visualize there is a lot of potential for miss-alignment! Fortunately I have not heard of Pentax Owners having any problems with door switches, perhaps I'm overly worried.
My K110D switch only failed because I broke it when I opened the case.
Are your cards different brands? If they are all the same and bought together you might find someone (or a store) who can try them in another camera. It is conceivable that you have a bad batch. If they are multiple brands then it would be unlikely the cards are bad.
The only thing I can think of to try on your camera itself is blowing out the memory slot with air. Perhaps there is something interfering with the protect switch that you could dislodge.