SELECT 
  cscart_product_prices.product_id, 
  MIN(
    IF(
      cscart_product_prices.percentage_discount = 0, 
      cscart_product_prices.price, 
      cscart_product_prices.price - (
        cscart_product_prices.price * cscart_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  cscart_product_prices 
WHERE 
  cscart_product_prices.product_id IN (
    20673, 20947, 22253, 20168, 19430, 19431, 
    19432, 19438, 19439, 19440, 19443, 
    19444, 19445, 19760, 19761, 19814, 
    19815, 19816, 19817, 19819, 19861, 
    20674, 22462, 21341, 19934, 19138, 
    19433, 19434, 19435, 19436, 19437, 
    19441, 19442, 19759, 19818, 19932
  ) 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  cscart_product_prices.product_id

Query time 0.01221

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "cscart_product_prices.product_id",
      "temporary_table": {
        "nested_loop": [
          {
            "table": {
              "table_name": "cscart_product_prices",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "key": "lower_limit",
              "key_length": "3",
              "used_key_parts": ["lower_limit"],
              "ref": ["const"],
              "rows": 11706,
              "filtered": 22.44810867,
              "attached_condition": "cscart_product_prices.lower_limit <=> 1 and cscart_product_prices.product_id in (20673,20947,22253,20168,19430,19431,19432,19438,19439,19440,19443,19444,19445,19760,19761,19814,19815,19816,19817,19819,19861,20674,22462,21341,19934,19138,19433,19434,19435,19436,19437,19441,19442,19759,19818,19932) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
19138 215.00000000
19430 335.00000000
19431 335.00000000
19432 335.00000000
19433 335.00000000
19434 335.00000000
19435 335.00000000
19436 335.00000000
19437 335.00000000
19438 335.00000000
19439 335.00000000
19440 335.00000000
19441 335.00000000
19442 335.00000000
19443 335.00000000
19444 335.00000000
19445 335.00000000
19759 335.00000000
19760 335.00000000
19761 335.00000000
19814 335.00000000
19815 335.00000000
19816 335.00000000
19817 335.00000000
19818 335.00000000
19819 335.00000000
19861 335.00000000
19932 215.00000000
19934 335.00000000
20168 335.00000000
20673 335.00000000
20674 335.00000000
20947 335.00000000
21341 335.00000000
22253 335.00000000
22462 335.00000000