One of the modern control design methods for stabilization of affine nonlinear systems is the so-called control Lyapunov function method which is used to design universal formulas for control law like Sontag’s formula. It is known that the latter cannot be directly extended to delay systems using Lyapunov-Razumikhin functions.In this paper, we use modified conditions for the derivative of a Lyapunov function to solve the stabilization problem for nonlinear affine time-variant delay systems under state constraints. The assumptions introduced make it possible to provide the Sontag-based solution for the problem using a Razumikhin-type control Lyapunov function (CLRF). A stabilizing feedback law is proposed in terms of CLRF whose derivative can change sign under the Razumikhin condition. State constraints are taken into account in the form of an unsafe set, and in order to ensure the safety objective, we use a Razumikhin-type control barrier function (CBRF). Furthermore, for time-invariant systems the suggested CLRF and CBRF are combined to achieve the stabilization and safety objectives simultaneously.