Revert "Remove some ret on SCAN_UNLOCK"

This reverts commit 2ddffc2ea3497bf4716c0d5551b5aae7f0c2b39d.
Trying to revert to ca179dd6104b14053cec1a33b3b49959b3356357