Save long static stretching for after training or for separate sessions. Before training, use dynamic mobility and progressively harder warm-up sets, which raise tissue temperature and prepare the movement without temporarily reducing force output.
Holding a stretch for a long time immediately before performance can produce a short-lived reduction in strength and power. The effect is generally small and short-lived, and it matters most before maximal or explosive work. Beyond that, a static stretch does not achieve what a warm-up is supposed to achieve: It does not raise temperature much and it does not rehearse the movement.
If a specific restriction genuinely blocks a position you need, a brief hold of 15 to 20 seconds followed by active work in the new range is reasonable. The order matters: Open the range, then load it, then start the session.
Tissues are warm, no performance is at stake, and you are already there. This is the natural home for longer holds of 30 to 60 seconds aimed at building range over time.
If flexibility is a genuine goal, dedicated sessions on non-training days give it the attention it needs without competing with anything. Four or five short sessions a week produce more change than one long one.
Dynamic before, static after or separately. Practical detail on warm-up structure is in Flexibility vs Mobility in Athletic Performance.