Not giving right message
<p>I'm trying to figure out why when the user is locked out and it has NOT been 10 minutes then they are given a message of:</p>

<blockquote>
  <p>Account is unlocked. You may now try to log in again!</p>
</blockquote>

<p>I'm not sure why.</p>

<pre><code>// User is registered and verified
$query = "SELECT * FROM users_logins_attempts WHERE users_id = '".$users_id."'";
$result = mysqli_query($dbc,$query);
$row = mysqli_fetch_array($result);

$lock_date = $row['lock_date'];
$current_time = time();

// Find out if user is locked out of their account
if (($lock_date != "0000-00-00 00:00:00") &amp;&amp; strtotime($lock_date) &lt; $current_time) { 

    $lock_date = strtotime($lock_date);
    $diff = $current_time - $lock_date;
    $diff = floor($diff/60); 

    // Take minutes and perform tasks
    if ($diff &lt;= 10) {

        // Calculate time remaining
        $time_remaining = 10 - $diff;

        // Account locked error
        $errors = true;
        $message = "Account is locked. You must wait " .$time_remaining." minutes before you can log in again!";

        $output = array('errorsExist' =&gt; $errors, 'message' =&gt; $message);

    } else {

        // Clear the lock
        $query = "UPDATE users_logins_attempts SET lockDate = NULL, ip_address = NULL, failed_logins = 0 WHERE users_id = '".$users_id."'";
        $result = mysqli_query($dbc,$query);

        // Account locked error
        $errors = true;
        $message = "Account is unlocked. You may now try to log in again!";

        $output = array('errorsExist' =&gt; $errors, 'message' =&gt; $message);

    } 

} 
</code></pre>
