Two inputs within x amount of Time

Hi! I'm super brand new to arduino but I love what I've learned so far. I'm currently working on a project where two lasers would ideally trigger photosensors to then turn off LEDs. I've gotten it to work that the LEDs will ONLY turn off if BOTH photosensors are over a certain threshold but I cant figure out how to add a timing element to it.
(The idea is that you shoot out the security cameras and it "turns off" the security system. It's a star wars game)
Ideally I want to have the program start time when any one of the photosensors is triggered and then only turn off the LEDs if the other photosensor is triggered within say 3 seconds or so. If 4 or more seconds then stays lit.
I hope that makes sense. Here's the code I have so far if anyone has advice

void setup() {0

; Serial.begin(9600);

pinMode(3, OUTPUT);

}

void loop() {

int sensorValue1 = analogRead(A0);

int sensorValue2 = analogRead(A1);

if ((sensorValue1 > 400)and (sensorValue2 >400))({digitalWrite (3, LOW)

;}

);else

digitalWrite(3,HIGH);

}

Here's the code I have so far if anyone has advice

Lose the semicolon before the "else".
Get rid of the pointless "0;" and the useless "(" and ")"
Give the pins meaningful names.
Use code tags when posting code.

What does the compiler say?

To combine two logic statements inside an "if" you use && not "and"

"and" is fine

AWOL:
"and" is fine

Oh, didn't know that. :confused: