When dealing with long filenames, it seems the token exceeds it's char limit on the database of 128chars, and causes LOCK calls to fail. It seems the filename limit is around 90 characters. Have not investigated whether external factors count into it as well.