The shutdown procedure is made of two stages:

First Stage

The first stage, is triggered when the ignition signal (CAN bus or wired) goes away.
During this stage (TIMER1 value) if ignition signal turn on again, TIMER1 value is restored for the next event, and shutdown procedure is aborted.
If the condition of ignition missing persists, TIMER1 elapses and Carberry goes in Second Stage of shudown.

Second Stage

The second stage of the shutdown procedure, is made to inform Raspberry Pi software, that the vehicle is turned off and a low power mode is imminent.
In fact, if enabled, Carberry starts to notify the countdown with the unsolicited message:

EVNT GOTOSLEEP 30
EVNT GOTOSLEEP 29
EVNT GOTOSLEEP ..

During this stage (TIMER2 value) if ignition signal turn on again, nothing happens, and the shutdown procedure continues.
The capability to delay the shutdown, is in the hands of Raspberry Pi software, that can issue a command like:

IGNITION KEEPALIVE

that reload TIMER2 and prevents shutdown to proceed.