I recently had a similar issue. OS X has a "safety" feature where, if the system detects a problem with a volume, it can then set a flag in that drive's partition table that forces OS X to run "fsck" (a unix disk utility) on the volume before it can be mounted.
What I have observed is that if you are booted into the Recovery partition of that machine (or also I would guess, an OS X install drive), the corrupted volume will appear as "locked", as you are seeing. I have even had OS X Disk Utility tell me that the volume had a "hardware error" when, in fact, it did not.
Note that if you boot in target disk mode and attempt to mount the corrupt volume on another Mac, then what will happen (on 10.8.x or newer) is that instead of mounting the volume, OS X will run fsck in the background, although the user has no indication that is happening unless you look in Activity Monitor, and view All Processes (sort by CPU % for best results). Fsck can take its sweet time, 30-45 minutes on my 750 GB MacBook Pro! If you run Disk Utility or similar utilities like Disk Warrior during this time, since fsck is already running on that drive, then the other disk utility will report a hardware error, even though the hardware is fine.
However if you wait until fsck stops running silently in the background, OS X will eventually mount the drive in read-only mode, which is what you have observed as the volume being "locked".
What I did to fix it was boot the MacBook in target disk mode and connect it to my desktop Mac, then wait until fsck failed and the disk mounted as read-only. Then run TechTool Pro utility and scan for bad blocks, none found, hardware is perfect. Next run DiskWarrior and rebuild and replace the corrupt directory. Fixed.
You could also boot from a DiskWarrior recovery disk if you don't have another Mac. The TechTool Pro surface scan may be considered optional, unless you really want to rule out hardware failure.
I have had two drives recently where the Console logs showed i/o errors and other issues that you would think meant hardware failure, but at the end of the day it was caused by old, incompatible 3rd-party software. In one case, it was Google Drive that caused it, in another, an outdated copy Symantec PGP WDE. I would check all your Library/LaunchDaemons and LaunchAgents and any StartupItems and Extensions and Spotlight Plugins on all systems and make sure there are no outdated things lurking around. Apple's last three major OS X releases have ever-tightening security and sandboxing that has wreaked absolute havok on low-level hardware-related third-party stuff.