@András Ratz The REST API doesn't have the ability to browse messages but you can do this using the SDK for language. This would not lock messages and lets you to just view the messages.
But if you can't use the SDK, then I suppose the option is to try setting the timeout
query parameter as shown in the example in the REST API Reference, which I can confirm works though undocumented explicitly.
Another option you could explore is to use the ARM REST API, Queues - Get (or Subscriptions - Get), which also returns message count details.