Unlock with defer