If a SpanGuard enabled port receives a BPDU, it becomes locked and transitions to the blocking state.
It only transitions out of the blocking state after a globally specified time or when it is manually unlocked.
If you configure spanguardtimeout = 0 then the port remains locked until it is manually cleared.
However, if there is a link down/up on the port then this can also clear the lock.
This is where autounlock comes in. Span Guard Autounlock sets the automatic unlocking of spanguard-locked ports when operstatus is not up (for example, link loss). When the value is enable the port become unlocked. When the value is disable the port remains locked until manually unlocked using the set spantree spanguard-autounlock or clear spantree spanguard-autounlock commands.
The default setting for the switch is Autounlock enabled.
set spantree spanguard-autounlock [enable | disable]