Complex AND/OR in backend conditional

There's no 'and' in haproxy logic, but if you expand the brackets and write it like this, you should be good:

use_backend prod-api-backend if prod url_opt-in or prod url_api