Why transaction blocking simple insert in MySQL?
For transaction blocking, the first line of defense is to speed up the query.  Though this does not completely eliminate the possibly of block/delay/deadlock, it will often make the situation more tolerable.
Re the LIMIT 1 -- Is there only 1?  If so, why not do a JOIN.  Or might there be more than one?  If so, which one?  That is, don't you need an ORDER BY?
servertoken needs INDEX(userToken, serverToken)
Would a single INSERT ... ON DUPLICATE KEY UPDATE ... suffice for your lengthy set of queries?  If so, it would probably be a lot faster.
I see an OR in the long query.  This is likely to prevent usage of an index.  (I don't understand the intent of the query well enough to suggest an alternative.)
&quot;RootFolderPath LIKE CONCAT (...&quot; -- This smells like something that should be redesigned.  Consider putting path parts in separate columns?  Or something else.
Is folderId the PRIMARY KEY of folderTable?
Plese provide SHOW CREATE TABLE (as text, not image) for each relevant table.