SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_sum_products_amount 
WHERE 
  1 
  AND product_id IN (
    128, 51118, 51117, 51116, 51115, 51114, 
    51113, 51165, 51164, 51163, 51162, 
    51161, 52, 51183, 20, 51188, 51187, 
    51186, 51185, 51184, 51201, 51200, 
    51199, 51198, 51197, 51196, 51195, 
    131, 51231, 51230, 51229, 51228, 51227, 
    51226, 51225, 109, 51243, 51242, 51241, 
    51240, 51239, 36, 51253, 51252, 51251, 
    51250, 51249, 34, 51265, 51264, 51263, 
    51262, 51261, 51260, 51259, 110, 51273, 
    147, 51277, 51276, 51275, 51274, 51346, 
    118, 114, 84, 51352, 51351, 96
  )

Query time 0.00074

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "77.11"
    },
    "table": {
      "table_name": "cscart_warehouses_sum_products_amount",
      "access_type": "range",
      "possible_keys": [
        "PRIMARY"
      ],
      "key": "PRIMARY",
      "used_key_parts": [
        "product_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 133,
      "rows_produced_per_join": 133,
      "filtered": "100.00",
      "index_condition": "(`test_uchur_k`.`cscart_warehouses_sum_products_amount`.`product_id` in (128,51118,51117,51116,51115,51114,51113,51165,51164,51163,51162,51161,52,51183,20,51188,51187,51186,51185,51184,51201,51200,51199,51198,51197,51196,51195,131,51231,51230,51229,51228,51227,51226,51225,109,51243,51242,51241,51240,51239,36,51253,51252,51251,51250,51249,34,51265,51264,51263,51262,51261,51260,51259,110,51273,147,51277,51276,51275,51274,51346,118,114,84,51352,51351,96))",
      "cost_info": {
        "read_cost": "63.81",
        "eval_cost": "13.30",
        "prefix_cost": "77.11",
        "data_read_per_join": "2K"
      },
      "used_columns": [
        "product_id",
        "amount"
      ]
    }
  }
}

Result

product_id amount
20 2
20 2
34 3
34 3
36 3
36 3
52 2
52 2
84 18
84 18
96 4
96 4
109 3
109 3
110 3
110 3
114 25
114 25
118 20
118 20
128 3
128 3
131 2
131 2
147 2
147 2
51113 2
51113 2
51114 2
51114 2
51115 3
51115 3
51116 2
51116 2
51117 2
51117 2
51118 1
51118 1
51161 2
51161 2
51162 3
51162 3
51163 1
51163 1
51164 1
51164 1
51165 1
51165 1
51183 1
51183 1
51184 3
51184 3
51185 5
51185 5
51186 4
51186 4
51187 2
51187 2
51188 2
51188 2
51195 2
51195 2
51196 4
51196 4
51197 4
51197 4
51198 3
51198 3
51199 3
51199 3
51200 3
51200 3
51201 1
51201 1
51225 2
51225 2
51226 5
51226 5
51227 5
51227 5
51228 2
51228 2
51229 2
51229 2
51230 1
51230 1
51231 2
51231 2
51239 3
51239 3
51240 2
51240 2
51241 2
51241 2
51242 2
51242 2
51243 1
51243 1
51249 3
51249 3
51250 2
51250 2
51251 3
51251 3
51252 1
51252 1
51253 2
51253 2
51259 4
51259 4
51260 8
51260 8
51261 5
51261 5
51262 2
51262 2
51263 4
51263 4
51264 3
51264 3
51265 3
51265 3
51273 4
51273 4
51274 5
51274 5
51275 2
51275 2
51276 2
51276 2
51277 1
51277 1
51346 10
51346 10
51351 6
51351 6
51352 2
51352 2