create the recordset that returns the lock value, then create an if statement that uses the header function to redirect to another page if the value is 0, make sure this code comes before the security assist authenticate user code:
<?php
if($row_recordsetName['lockColumn'] == "0") {
header("Location: loginlocked.php");
exit;
}
?>