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 (
    357038, 358186, 350654, 350889, 351111, 
    359307, 355184, 357857, 350727, 354634, 
    357680, 350718, 355245, 358130, 358146, 
    359166, 351020, 355292, 357278, 359195, 
    359388, 350728, 350801, 357311, 357839, 
    359272, 359313, 351692, 354594, 357977, 
    357996, 358128, 359146, 357042, 358216, 
    350872, 351492, 352774, 351516, 355179, 
    355205, 352287, 357172, 351056, 358166, 
    350828, 350900, 350942, 351017, 357299, 
    357850, 359169, 353933, 357041, 357069, 
    350768, 350823, 350887, 350923, 351129, 
    356169, 357053, 357750, 358206, 350635, 
    351514, 352292, 351499, 354909, 355214, 
    355331, 357099, 351171, 351655, 357257, 
    351219, 356141, 357847, 351041, 351045, 
    356934, 357933, 359097, 351006, 351669, 
    351702, 354910, 355213, 350670, 350809, 
    353938, 357717, 351712, 350755, 351167, 
    351482, 354938, 355301, 357755, 357764
  ) 
  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.00145

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "280.31"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "usergroup",
        "used_key_parts": [
          "product_id",
          "usergroup_id",
          "lower_limit"
        ],
        "key_length": "9",
        "rows_examined_per_scan": 200,
        "rows_produced_per_join": 200,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "240.31",
          "eval_cost": "40.00",
          "prefix_cost": "280.31",
          "data_read_per_join": "12K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`webmarco`.`cscart_product_prices`.`lower_limit` = 1) and (`webmarco`.`cscart_product_prices`.`product_id` in (357038,358186,350654,350889,351111,359307,355184,357857,350727,354634,357680,350718,355245,358130,358146,359166,351020,355292,357278,359195,359388,350728,350801,357311,357839,359272,359313,351692,354594,357977,357996,358128,359146,357042,358216,350872,351492,352774,351516,355179,355205,352287,357172,351056,358166,350828,350900,350942,351017,357299,357850,359169,353933,357041,357069,350768,350823,350887,350923,351129,356169,357053,357750,358206,350635,351514,352292,351499,354909,355214,355331,357099,351171,351655,357257,351219,356141,357847,351041,351045,356934,357933,359097,351006,351669,351702,354910,355213,350670,350809,353938,357717,351712,350755,351167,351482,354938,355301,357755,357764)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
350635 3.37000000
350654 4.22000000
350670 9.66000000
350718 8.47000000
350727 6.26000000
350728 4.22000000
350755 16.75000000
350768 8.47000000
350801 3.03000000
350809 3.71000000
350823 3.88000000
350828 3.88000000
350872 6.26000000
350887 9.27000000
350889 11.53000000
350900 8.47000000
350923 6.94000000
350942 15.05000000
351006 6.43000000
351017 9.78000000
351020 9.66000000
351041 1.67000000
351045 1.50000000
351056 3.88000000
351111 25.25000000
351129 10.17000000
351167 10.34000000
351171 10.17000000
351219 11.02000000
351482 62.65000000
351492 42.25000000
351499 57.55000000
351514 28.65000000
351516 20.88000000
351655 6.90000000
351669 24.57000000
351692 13.01000000
351702 7.62000000
351712 13.35000000
352287 6.77000000
352292 12.33000000
352774 2.18000000
353933 254.75000000
353938 268.35000000
354594 118.75000000
354634 6.26000000
354909 2.35000000
354910 1.84000000
354938 7.96000000
355179 8.81000000
355184 3.54000000
355205 6.94000000
355213 5.07000000
355214 4.22000000
355245 6.99000000
355292 12.84000000
355301 10.51000000
355331 6.99000000
356141 2.01000000
356169 0.82000000
356934 76.25000000
357038 67.75000000
357041 5.07000000
357042 0.36000000
357053 3.88000000
357069 3.20000000
357099 23.04000000
357172 5.75000000
357257 4.22000000
357278 3.37000000
357299 2.52000000
357311 2.52000000
357680 12.72000000
357717 1.33000000
357750 6.26000000
357755 2.69000000
357764 1.67000000
357839 4.22000000
357847 13.06000000
357850 6.77000000
357857 5.92000000
357933 1.84000000
357977 1.67000000
357996 1.50000000
358128 6.26000000
358130 6.77000000
358146 5.75000000
358166 1.22000000
358186 2.69000000
358206 1.33000000
358216 2.45000000
359097 5.07000000
359146 3.71000000
359166 9.49000000
359169 2.35000000
359195 4.73000000
359272 4.22000000
359307 0.99000000
359313 1.33000000
359388 9.66000000