Searching in locks