I think this is currently generating a structured query with a locks-query element, but this has changed to locks-fragment-query in 8.0.
I don't have a test case for you because I came across it via visual inspection when trying to compare what Java does to what Node.js is doing. (Both are wrong, I think). I'm basing this on the serialization I see underneath in StructuredQueryBuilder.locks, but I'm on shaky ground as I don't know diddly about the Java impl.
The other reason is I don't know how to construct a meaningful locks query example. :)
This is not high priority issue. My understanding is this is a relatively obscure query type.
There is a little more detail in the node client issue I filed. It's here: marklogic/node-client-api#64