Why biological quality-control systems fail is often mysterious. Specifically, checkpoints such as the DNA damage checkpoint or the spindle assembly checkpoint are overriden after prolonged arrests allowing cells to continue dividing despite the continued presence of errors. Although critical for biological systems, checkpoint override is poorly understood quantitatively by experiment or theory. Override may represent a trade-off between risk and speed, a fundamental principle explaining biological phenomena. Here, we derive the first, general theory of optimal checkpoint strategies, balancing risk and opportunities for growth. We demonstrate that the mathematical problem of finding the optimal strategy maps onto the question of calculating the optimal absorbing boundary for a random walk, which we show can be solved efficiently recursively. The theory predicts the optimal override strategy without any free parameters based on two inputs, the statistics i) of error correction and ii) of survival. We apply the theory to the prominent example of the DNA damage checkpoint in budding yeast (Saccharomyces cerevisiae) experimentally. Using a novel fluorescent construct which allowed cells with DNA breaks to be isolated by flow cytometry, we quantified i) the probability distribution function of repair for a double-strand DNA break (DSB), including for the critically important, rare events deep in the tail of the distribution, as well as ii) the survival probability if the checkpoint was overridden. Based on these two measurements, the optimal checkpoint theory predicted remarkably accurately the DNA damage checkpoint override times as a function of DSB numbers, which we measured precisely at the single-cell level. Our multi-DSB results refine well-known bulk culture measurements and show that override is a more general phenomenon than previously thought. Further, we show for the first time that override is an advantageous strategy in cells with wild-type DNA repair genes. The universal nature of the balance between risk and self-replication opportunity is in principle relevant to many other systems, including other checkpoints, developmental decisions, or reprogramming of cancer cells, suggesting potential further applications of the theory.