SELECT 
  cscart_product_sales.product_id, 
  amount AS sales_amount 
FROM 
  cscart_product_sales 
  LEFT JOIN cscart_products_categories ON cscart_products_categories.product_id = cscart_product_sales.product_id 
  AND cscart_products_categories.category_id = cscart_product_sales.category_id 
WHERE 
  cscart_product_sales.product_id IN (277101, 243684, 277987) 
  AND cscart_products_categories.link_type = 'M'

Query time 0.00076

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "3.16"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_product_sales",
          "access_type": "range",
          "possible_keys": [
            "PRIMARY",
            "pa"
          ],
          "key": "pa",
          "used_key_parts": [
            "product_id"
          ],
          "key_length": "3",
          "rows_examined_per_scan": 3,
          "rows_produced_per_join": 3,
          "filtered": "100.00",
          "index_condition": "(`s2cart`.`cscart_product_sales`.`product_id` in (277101,243684,277987))",
          "cost_info": {
            "read_cost": "1.81",
            "eval_cost": "0.30",
            "prefix_cost": "2.11",
            "data_read_per_join": "48"
          },
          "used_columns": [
            "category_id",
            "product_id",
            "amount"
          ]
        }
      },
      {
        "table": {
          "table_name": "cscart_products_categories",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY",
            "link_type",
            "pt"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "category_id",
            "product_id"
          ],
          "key_length": "6",
          "ref": [
            "s2cart.cscart_product_sales.category_id",
            "s2cart.cscart_product_sales.product_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 2,
          "filtered": "99.28",
          "cost_info": {
            "read_cost": "0.75",
            "eval_cost": "0.30",
            "prefix_cost": "3.16",
            "data_read_per_join": "47"
          },
          "used_columns": [
            "product_id",
            "category_id",
            "link_type"
          ],
          "attached_condition": "(`s2cart`.`cscart_products_categories`.`link_type` = 'M')"
        }
      }
    ]
  }
}

Result

product_id sales_amount
243684 1