Have you checked your XLSForm with this online validator ,please? This is always recommended during development and before deployment (for Kobo).
Can you try this:
if( number(${a2_1} <= 40, ‘1’, if(…
Hint: Select values are always stored as strings.
Better use you integer in the initial question, and you can do it as
if( ${a2_1} <= 40, ‘1’, if(…
