Digital twins have gained a lot of attention in modern day industry, but practical challenges arise from the requirement of continuous and real-time data integration. The actual physical systems are also exposed to disturbances unknown to the real-time simulation. Therefore, adaptation is required to ensure reliable performance and to improve the usability of digital twins in monitoring and diagnostics. This study proposes a general approach to the real-time adaptation of digital twins based on a mechanism guided by evolutionary optimization. The mechanism evaluates the deviation between the measured state of the real system and the estimated state provided by the model under adaptation. The deviation is minimized by adapting the model input based on the differential evolution algorithm. To test the mechanism, the measured data were generated via simulations based on a physical model of the real system. The estimated data were generated by a surrogate model, namely a simplified version of the physical model. A case study is presented where the adaptation mechanism is applied on the digital twin of a marine thruster. Satisfactory accuracy was achieved in the optimization during continuous adaptation. However, further research is required on the algorithms and hardware to reach the real-time computation requirement.