pkcs11: Added mutex lock to C_Logout