Control tasks with high levels of uncertainty and safety requirements are increasingly common. Typically, techniques that guarantee safety during learning and control utilize constraint-based safety certificates, which can be leveraged to compute safe control inputs. However, if model uncertainty is very high, the corresponding certificates are potentially invalid, meaning no control input satisfies the constraints imposed by the safety certificate. This paper considers a learning-based setting with a safety certificate based on a control barrier function second-order cone program. If the control barrier function certificate is valid, our approach leverages the control barrier function to guarantee safety. Otherwise, our method explores the system to recover the feasibility of the control barrier function constraint as fast as possible. To this end, we employ a method inspired by well-established tools from Bayesian optimization. We show that if the sampling frequency is high enough, we recover the feasibility of a control barrier function second-order cone program, guaranteeing safety. To the best of our knowledge, this corresponds to the first algorithm that guarantees safety through online learning without requiring a prior model or backup safe non-learning-based controller.