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 (
    20221, 20222, 20223, 21286, 21287, 21288, 
    21289, 21290, 21291, 22177, 21514, 
    22151, 21292, 21293, 21342, 21294, 
    21295, 21343, 21296, 21297, 21344, 
    22152, 22153, 21345, 21346, 21347, 
    21348, 22154, 22155, 22156, 22159, 
    21349, 21350, 22157, 22158, 21552, 
    21553, 21351, 21488, 21352, 21353, 
    21354, 21298, 21355, 21299, 21300, 
    21301, 21302, 22160, 21303, 22175, 
    21356, 21357, 22161, 21304, 21305, 
    21306, 21307
  ) 
  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.01217

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": 58.46075058,
              "attached_condition": "cscart_product_prices.lower_limit <=> 1 and cscart_product_prices.product_id in (20221,20222,20223,21286,21287,21288,21289,21290,21291,22177,21514,22151,21292,21293,21342,21294,21295,21343,21296,21297,21344,22152,22153,21345,21346,21347,21348,22154,22155,22156,22159,21349,21350,22157,22158,21552,21553,21351,21488,21352,21353,21354,21298,21355,21299,21300,21301,21302,22160,21303,22175,21356,21357,22161,21304,21305,21306,21307) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
20221 275.00000000
20222 275.00000000
20223 275.00000000
21286 215.00000000
21287 215.00000000
21288 215.00000000
21289 215.00000000
21290 215.00000000
21291 215.00000000
21292 215.00000000
21293 215.00000000
21294 215.00000000
21295 215.00000000
21296 215.00000000
21297 215.00000000
21298 215.00000000
21299 215.00000000
21300 215.00000000
21301 215.00000000
21302 215.00000000
21303 215.00000000
21304 215.00000000
21305 215.00000000
21306 215.00000000
21307 215.00000000
21342 215.00000000
21343 215.00000000
21344 215.00000000
21345 215.00000000
21346 215.00000000
21347 215.00000000
21348 215.00000000
21349 215.00000000
21350 215.00000000
21351 215.00000000
21352 215.00000000
21353 215.00000000
21354 215.00000000
21355 215.00000000
21356 215.00000000
21357 215.00000000
21488 215.00000000
21514 215.00000000
21552 215.00000000
21553 215.00000000
22151 215.00000000
22152 215.00000000
22153 215.00000000
22154 215.00000000
22155 215.00000000
22156 215.00000000
22157 215.00000000
22158 215.00000000
22159 215.00000000
22160 215.00000000
22161 215.00000000
22175 215.00000000
22177 215.00000000