SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_sum_products_amount 
WHERE 
  1 
  AND product_id IN (
    18516, 51007, 51004, 51010, 51005, 51008, 
    51012, 51013, 51006, 51011, 51015, 
    51021, 51016, 51017, 51018, 51024, 
    51019, 51014, 51022, 51045, 51422, 
    51440, 51025, 51424, 51029, 51442, 
    51429, 51060, 51436, 51433, 51430, 
    51020, 51027, 51063, 51067, 51423, 
    51435, 51031, 51062, 51028, 51441, 
    51026, 51033, 51425, 51432, 51431, 
    51030, 51032, 51035, 51434, 51041, 
    51042, 51070, 51038, 51066, 51064, 
    51069, 51037, 51040, 51052, 51059, 
    51023, 51039, 51056
  )

Query time 0.00089

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "69.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": 118,
      "rows_produced_per_join": 118,
      "filtered": "100.00",
      "index_condition": "(`test_uchur_k`.`cscart_warehouses_sum_products_amount`.`product_id` in (18516,51007,51004,51010,51005,51008,51012,51013,51006,51011,51015,51021,51016,51017,51018,51024,51019,51014,51022,51045,51422,51440,51025,51424,51029,51442,51429,51060,51436,51433,51430,51020,51027,51063,51067,51423,51435,51031,51062,51028,51441,51026,51033,51425,51432,51431,51030,51032,51035,51434,51041,51042,51070,51038,51066,51064,51069,51037,51040,51052,51059,51023,51039,51056))",
      "cost_info": {
        "read_cost": "57.31",
        "eval_cost": "11.80",
        "prefix_cost": "69.11",
        "data_read_per_join": "1K"
      },
      "used_columns": [
        "product_id",
        "amount"
      ]
    }
  }
}

Result

product_id amount
18516 5
18516 5
51004 2
51004 2
51005 2
51005 2
51006 2
51006 2
51007 5
51007 5
51008 5
51008 5
51010 1
51010 1
51011 1
51011 1
51012 1
51012 1
51013 1
51013 1
51014 1
51014 1
51015 1
51015 1
51016 2
51016 2
51017 2
51017 2
51018 2
51018 2
51019 4
51019 4
51020 5
51020 5
51021 4
51021 4
51022 4
51022 4
51023 5
51023 5
51024 4
51024 4
51025 3
51025 3
51026 5
51026 5
51027 2
51027 2
51028 3
51028 3
51029 1
51029 1
51030 1
51030 1
51031 2
51031 2
51032 2
51032 2
51033 1
51033 1
51035 1
51035 1
51037 1
51037 1
51038 1
51038 1
51039 1
51039 1
51040 2
51040 2
51041 5
51041 5
51042 5
51042 5
51045 5
51045 5
51052 2
51052 2
51056 2
51056 2
51059 20
51059 20
51060 20
51060 20
51062 4
51062 4
51063 5
51063 5
51064 5
51064 5
51066 5
51066 5
51067 5
51067 5
51069 2
51069 2
51070 2
51070 2
51422 8
51422 8
51423 4
51423 4
51424 10
51424 10
51425 5
51425 5
51429 1
51429 1
51430 2
51430 2
51431 19
51431 19
51432 1
51432 1
51433 1
51433 1
51434 1
51434 1
51435 1
51435 1
51436 1
51436 1
51440 1
51440 1
51441 1
51441 1
51442 1
51442 1