Use this to find all locked files. This example searches the entire HD but you can navigate to a path if necessary.

find / -flags uchg

Use this to find and unlock all locked files.

find / -flags uchg -exec chflags nouchg {} \;

 

Other useful chflags commands:

sudo chflags uchg /path/to/file

sudo chflags nouchg /path/to/file