Input PUK code, when requested
I've resolved the issue by using AT commands instead of the GSM library provided through Arduino.

if(sendGPRSCommand(F("AT+CPIN?"),100).equals("AT+CPIN+CPIN:SIMPUKOK")){
    Serial.println(F("PUK is requested, entering it now"));
    String cmd = "AT+CPIN=\"";
    cmd.concat(PUK_NUMBER);
    cmd.concat("\",\"");
    cmd.concat(PIN_NUMBER);
    cmd.concat("\"");
    sendGPRSCommand(cmd,100);
  }


This code checks if the PUK code is requested, this is the case when the pin_query is -1 or -2 (see question). When the PUK code is requested the new PIN (which is still the same pin as the old one) is given in combination with the PUK code.
The AT commands were found in this manual.