RFID: RC522 double detection guidance needed

Hello, I would like to seek help on the RC522 RFID module on its double detection of card coding. I am doing a locking system. The codes showed below is part of my code I would like to edit on with your help.

 void loop() {
  uint8_t c;
  if (Serial.available()) {
    c = Serial.read();
    Serial.write(c);
    lcdPutCh(c);

  }


  {

    if (rfid.isCard()) {

      if (rfid.readCardSerial()) {
        if (rfid.serNum[0] != serNum0
          && rfid.serNum[2] != serNum2
          && rfid.serNum[3] != serNum3
          && rfid.serNum[4] != serNum4
          ) {

          Serial.println(" ");
          Serial.println("Card found");
          serNum0 = rfid.serNum[0];
          serNum1 = rfid.serNum[1];
          serNum2 = rfid.serNum[2];
          serNum3 = rfid.serNum[3];
          serNum4 = rfid.serNum[4];

          data[0] = serNum0;
          data[1] = serNum1;
          data[2] = serNum2;
          data[3] = serNum3;
          data[4] = serNum4;

          boolean m_card = true;
          boolean key_card = true;

          Serial.print("Card number(in HEX): ");
          for(int i =0; i < 5; i++)
          {
            if(data[i] < 16) Serial.print("0");
            Serial.print(data[i], HEX);


            if(data[i] != master[i]) m_card = false;
            if(data[i] != masterkey[i]) key_card = false;
          }             

          Serial.println();


          if(m_card) {

            lcdClrScr();
            lcdSetXY(0,0);
            lcdPutStr("Lock Closed!");
            digitalWrite(3, HIGH);
            delay(1000);
            digitalWrite(3, LOW);
            digitalWrite(7, LOW);
            digitalWrite(relayPin, LOW); 
            Serial.println("The lock is locked!");

          }


          else if(key_card){
            digitalWrite(relayPin, HIGH);
            Serial.println("The lock is unlocked.");
            lcdClrScr();
            lcdSetXY(0,0);
            lcdPutStr("Lock Open!");

          }

          else
          {

            Serial.println("\nUnregistered Card! No access!");
            lcdClrScr();
            lcdSetXY(0,0);
            lcdPutStr("Access Denied!");
            digitalWrite(2, HIGH);
            delay(500);
            digitalWrite(2, LOW);
            lcdClrScr();
            lcdSetXY(0,0);
            lcdPutStr("Please scan card");

          }


        }

      }

    }

    rfid.halt();
  }


}

"m_card" is the card that I'm currently using to lock the door.
"key_card" is the card that I'm using to unlock the door.

What I would want to seek help from is to only use "m_card" for both locking and unlocking. But the problem is it won't detect a double detection of the same card.