Diffrent Blinkprograms (without delay)

Hey. Have been searching for the answers but cannot find it...
The thing i want to make is to blink a led that is on digital 10 and it needs to be in diffrent speeds blinking where for example...

A 30 min program where the first 10 minutes it is blinking on x speed and 10 minutes that it is blinking z speed. The thing is that i need a program thats going to run if a button on lets say d2 is HIGH. I think what i am after is "while" but cannot really get this.

const int trigger = 2;
const int ledPin =  10;     

boolean ledState = LOW;
boolean previousButtonState = HIGH;
boolean buttonState = LOW;
boolean serialCheck = LOW;

long duration = 0;

unsigned long previousMillis = 0;       

// constants won't change :
const long interval = 4000;

void setup()
{
 Serial.begin(9600);
 // set the digital pin as output:
 pinMode(ledPin, OUTPUT);
 pinMode(trigger,INPUT);
}

void loop()
{
 unsigned long currentMillis = millis();

 if(currentMillis - previousMillis >= interval && buttonState == HIGH )
 {
   previousMillis = currentMillis;   
 //  Serial.println(buttonState);
//   if(buttonState == HIGH)
//   {
      if (ledState == LOW)
      {
        ledState = HIGH;
        Serial.println("led set high");
      }
      else
      {
        ledState = LOW;
      }
  // }
  
   if (millis() >= duration)
   {
     Serial.println("duration completed");
     previousButtonState = buttonState;
     buttonState = LOW;
     ledState = LOW;
   }
   // set the LED with the ledState of the variable:
   digitalWrite(ledPin, ledState);
 }

 if(digitalRead(trigger) == HIGH)
 {
   if(previousButtonState == HIGH)
   {
      Serial.println("pressed");
    //  Serial.println(currentMillis);
     buttonState = HIGH;
   }
   else
   {
     buttonState = LOW;
   }
   delay(150); //debouncing
   duration = millis() + 180000;   //Tiden Blinket kör
 }
}[

make sure to think things over before you start coding. consider the simplest approach.
you should need two timers. one for the long 10 minute duration. and a second timer for the blinker. third think you need is button detection. all three parts should be separate.

unsigned long last1;
unsigned long last2;
unsigned long timer1 = 250;
unsigned long timer2 = 10000;
byte mode = 0;
bool blinker;

void setup()
{
 
 pinMode(10, OUTPUT);
 pinMode(2,  INPUT);
}

void loop()
{  
  if(millis()-last1>timer1){last1=millis();
    blinker=!blinker;
    if(mode == 0){blinker = false;}
    digitalWrite(10,blinker);
    }

    
  if(millis()-last2>timer2){last2=millis();
    if(mode>0){mode--;}
    if(mode==2){timer1 = 250;}
    if(mode==1){timer1 = 500;}
   
    }
    
  if(digitalRead(2)){
    mode=3;last2=0;
    }
}