LPS-38104 Right use of the API to get the locks in a proper way