Avoid Delay

Look at using timeout timers instead of delay()

void DoSomethingNow() {
// do stuff now
timer.setTimeout(30000, DoSomethingLater);  // will run this function in 30 seconds
}

void DoSomethingLater() {
// do the later stuff
}

https://playground.arduino.cc/Code/SimpleTimer#Functions