Synthesis of biofuels is an important step in the phase out of fossil fuels in the transportation sector, especially in long-distance sea, air and road transport where direct electrification seems unfeasible. Integration of renewable electricity enables efficient electricity storage as well as an increased utilization of the biomass carbon, which lowers the biomass demand. This paper presents a flexible system for the conversion of biomass and electricity to methanol. The system is based on the deep integration of a Two-Stage gasifier and solid oxide cells (SOC). The integration enables efficient production of a nitrogen-free high-quality syngas, suitable for methanol production. This study focuses on the system in electrolysis mode, and analyzes the effects of recirculating CO2 from the gas conditioning and methanol synthesis process back to the SOC, as well as the effects of pressurized operation of the gasifier and increased H2O content in the gasifier. Thermodynamic modeling shows that CO2-recirculation allows an increase in conversion of the carbon in the biomass to methanol from 80 % up to 92 %, with an energy efficiency of 71 %. Only a slight pressurization seems feasible, as an increase in pressure beyond ~3 bar results in significant methane formation inside the SOC.