Then it's a question of how fast explosive bolts and the abort motor light up after being lit up. Hopefully fast enough that the fireball shockwave still hasn't reached the crew.
They're designed to be fast and get the crew away, unsurprisingly.
https://youtu.be/AqeJzItldSQ?t=100 apollo capsule escape system firing
https://youtu.be/1_FXVjf46T8?t=9 spaceX dragon escape system test
https://youtu.be/ESc_0MgmqOA?t=51 Blue Origin New shephard escape system test