manually unlock mutex without using defer

defer is causing a performance hit and the locking done here is simple