This work addresses the Dirichlet boundary condition for momentum in the lattice Boltzmann method (LBM), with focus on the steady-state Stokes flow modelling inside non-trivial shaped ducts. For this task, we revisit a local and highly accurate boundary scheme, called the local second-order boundary (LSOB) method. This work reformulates the LSOB within the two-relaxation-time (TRT) framework, which achieves a more standardized and easy to use algorithm due to the pivotal parametrization TRT properties. The LSOB explicitly reconstructs the unknown boundary populations in the form of a Chapman-Enskog expansion, where not only first- but also second-order momentum derivatives are locally extracted with the TRT symmetry argument, through a simple local linear algebra procedure, with no need to compute their non-local finite-difference approximations. Here, two LSOB strategies are considered to realize the wall boundary condition, the original one called Lwall and a novel one Lnode, which operate with the wall and node variables, roughly speaking. These two approaches are worked out for both plane and curved walls, including the corners. Their performance is assessed against well-established LBM boundary schemes such as the bounce-back, the local second-order accurate CLI scheme and two different parabolic multi-reflection (MR) schemes. They are all evaluated for 3D duct flows with rectangular, triangular, circular and annular cross-sections, mimicking the geometrical challenges of real porous structures. Numerical tests confirm that LSOB competes with the parabolic MR accuracy in this problem class, requiring only a single node to operate. This article is part of the theme issue 'Fluid dynamics, soft matter and complex systems: recent results and new methods'.