Found a way to lock contemporarely 2 cells without deadlock
New locking system core program works