Lock error trying to save a PCB

You didn’t say what version of KiCad this relates to . . . but, does any of this help ? (I know it’s about Schematics and you have an issue with PCB but the mechanism might be the same)