Trigger alarm when 2 or more motion sensors detects motion within 5 minutes

I have 4 motion sensors located in different rooms of my house. When I’m not home, I use those sensors to trigger my alarm. But the problem is PIR motion sensors sometime (lots of times) produce false positive motion detections. What I want to achieve is this: Whenever motion detected in any of my sensors, wait for 5 minutes to see if any other sensor also detects motion. This way I could eliminate false alarms related to one specific sensor. Is that doable?

Sure.
Make a helper to store a timestamp and the sensor.
Whenever a sensor is activated it will check that sensor and if the sensor is different and the timestamp is less than 5 minutes old, then activate alarm. Otherwise store the sensor and the timestamp.