This isn't going to be possible with just an if statement. This requires code to keep track of both the IO states and some timing.
First, look at the blink without delay example for how to handle timing without using delay().
Your code is going to be broken down into several parts.
First is the code that monitors a given input, and keeps track of how long it has been low, then sets a bool flag when it's been low for a specific amount of time. Use the blink without delay code as the basis for this code. Think about what you want your previousMillis value to be; ie, when do you update this value. That will be the main change you need to make in the code.
You'll want that code running for two separate IO points, which is going to require to separate sets of state variables. Ideally, you'll want to avoid duplicating code as much as possible.
After all that is working, it's just a simple matter of writing an if statement that checks flaga and flagb to determine if both input have been low for greater than 20 seconds.