There are various situations where a site collection administrator has to make changes to the lock status of a/multiple site collections. It could be because you are migrating, or you want to execute some auditing and so on. Below is a script which can help you do the same. We can change the Lock state of a site collection to any of the available one. You can also add multiple site collections in the $sitelist parameter.
Hope it helps :) !
$sitelist = @("https://yoursitecollectionURL",)
foreach($site in $sitelist){
$s = get-spsite $site
$s.LockIssue = "Any text you want to add for logging purpose"
//Set-SPSite -Identity $site -LockState [NoAccess|UnLock|ReadOnly]
Set-SPSite -Identity $site -LockState NoAccess
}