SELECT 
  p.product_id 
FROM 
  cscart_products as p 
  LEFT JOIN cscart_products_categories as pc ON p.product_id = pc.product_id 
  LEFT JOIN cscart_categories as c ON c.category_id = pc.category_id 
WHERE 
  1 
  AND pc.category_id IN (303) 
  AND p.status = 'A' 
  AND c.status = 0 
  AND p.parent_product_id = 0

Query time 0.00039

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "c",
          "access_type": "const",
          "possible_keys": ["PRIMARY", "p_category_id"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["category_id"],
          "ref": ["const"],
          "rows": 1,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "pc",
          "access_type": "ref",
          "possible_keys": ["PRIMARY", "pt"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["category_id"],
          "ref": ["const"],
          "rows": 42,
          "filtered": 100,
          "using_index": true
        }
      },
      {
        "table": {
          "table_name": "p",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY", "status", "idx_parent_product_id"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["product_id"],
          "ref": ["demov2026.pc.product_id"],
          "rows": 1,
          "filtered": 95.59016418,
          "attached_condition": "p.parent_product_id = 0 and p.`status` = 'A'"
        }
      }
    ]
  }
}

Result

product_id
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321