In this work, we consider a microfluidic mixer that uses hydrodynamic diffusion stream to induce the beginning of the folding process of a certain protein. To perform these molecular changes, the concentration of the denaturant, which is introduced into the mixer together with the protein, has to be diminished until a given value in a short period of time, known as mixing time. In this context, this article is devoted to optimize the design of the mixer, focusing on its shape and its flow parameters with the aim of minimizing its mixing time. First, we describe the involved physical phenomena through a mathematical model that allows us to obtain the mixing time for a considered device. Then, we formulate an optimization problem considering the mixing time as the objective function and detailing the design parameters related to the shape and the flow of the mixer. For dealing with this problem, we propose an enhanced optimization algorithm based on the hybridization of two techniques: a genetic algorithm as a core method and a multi-layer line search methodology based on the secant, which aims to improve the initialization of the core method. More precisely, in our hybrid approach, the core optimization is implemented as a sub-problem to be solved at each iteration of the multi-layer algorithm starting from the initial conditions that it provides. Before applying it to the mixer design problem, we validate this methodology by considering a set of benchmark problems and, then, compare its results to those obtained with other classical global optimization methods. As shown in the comparison, for the majority of those problems, our methodology needs fewer evaluations of the objective function, has higher success rates and is more accurate than the other considered algorithms. For those reasons, it has been selected for solving the computationally expensive problem of optimizing the mixer design. The obtained optimized device shows a great reduction in its mixing time with respect to the state-of-the-art mixers.