You would have to use Javascript for this. Here is an example count down
https://www.w3schools.com/howto/howto_js_countdown.asp
in this function in the w3school example
if (distance < 0) {
clearInterval(x);
document.getElementById("demo").innerHTML = "EXPIRED";
}
You can call the function that submits the quiz