Can you format the SD Card in a computer and then try it in the camera?
If it still fails, it appears as though the contact in the SD Card reader in the camera, that detects the position of the lock switch on the SD Card may be bent or stuck, indicating the card is locked when it isn't.
You’ll probably have to open the camera to access the SD card reader and most probably have to replace it.
Here’s a link to the ifixit Sony Cybershot DSC-W830 Motherboard Replacement guide which may be of some help in gaining access to the card reader.
If this seems too daunting, contact a reputable, professional camera repair service and ask for a quote