I hope you have backups of these files because then you can just load the backups, (try one just as a test), and when you have confirmed they all work, delete all the locked files.
It seems you were hit with Ransomware, a form of malware that demands money from you for an unlock code. But without knowing which Ransomeware, there are many, your options are severely limited.
How do you know the files are locked? The file names may have 'locked' added to them, along with another file extension, but what happens when you try to open them?
Please give full details.
Here is an example of what one Ransomeware does;