Steps to reproduce
1) Create a folder Test, look up its ID in the DB.
2) Execute the following query in order to lock that row in the DB which represents folder Test.
3) Upload a document to folder Test.
Checkpoint: You should see that the document has been uploaded instantly to that folder, which means that even though the corresponding row of folder Test is locked in the DB, updating its last post date isn't happening right at that time when you upload something to it; instead it takes place in the background.
4) Take a thread dump and you'll see that one thread is hanging, because it isn't able to update that row, because you placed an explicit lock on it.
This is the same issue as
LPS-43399 however the fix cannot be backported to 6.2.x hence we have to create a fix for this branch individually.