Help me to code

2 Inputs (sensor1,sensor2)
1 Output( Output Relay )
The Code should be always in a sensing state to read sensor1
Relay only Gets ON for 3sec if Sensor1 is Triggered (5v)
Relay gets OFF after 3sec
During 3sec If Sensor2 gets Triggered (5v) Relay should get Off before 3sec

Question:
millis should be used or not ?
Or arduino has some Other Interrupts that can be used?
i need code regarding this ?

Yes, millis would be needed. Yes Arduino has interrupts, but this isn't something where they are needed or appropriate. We don't write code for people for free. If you want some code written for you then go tot he Gigs and Collaborations section of the forum and give exact requirements with details and how much you are willing to pay someone to write it.

loop() {

if the relay is currently off
read sensor1
if sensor1 is triggered
turn relay on
make a note of what millis is right now
end
else
read sensor 2
if sensor2 is triggered or millis-recorded millis > 3000
tun relay off
end
end

}