Introduce g_unlockableMinTime to control lock thresholds.
Fix an unreachable code warning and some comments.