SELECT 
  pfv.feature_id, 
  pfv.product_id, 
  pfv.variant_id, 
  gp.group_id 
FROM 
  cscart_product_features_values AS pfv 
  INNER JOIN cscart_product_variation_group_products AS gp ON pfv.product_id = gp.product_id 
  INNER JOIN cscart_product_variation_group_features AS gpf ON gpf.group_id = gp.group_id 
  AND gpf.feature_id = pfv.feature_id 
WHERE 
  pfv.lang_code = 'ar' 
  AND gp.group_id IN (
    54, 51, 48, 47, 46, 45, 44, 43, 39, 38, 37, 
    36, 34, 32, 31, 30, 29, 28, 8, 9, 10, 11, 
    12, 13, 14, 16, 17, 18, 19, 20, 21, 6, 3, 
    59
  )

Query time 0.00195

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "100.81"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "gp",
          "access_type": "index",
          "possible_keys": [
            "PRIMARY",
            "idx_group_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "product_id",
            "group_id"
          ],
          "key_length": "6",
          "rows_examined_per_scan": 190,
          "rows_produced_per_join": 116,
          "filtered": "61.05",
          "using_index": true,
          "cost_info": {
            "read_cost": "8.02",
            "eval_cost": "11.60",
            "prefix_cost": "19.62",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "product_id",
            "group_id"
          ],
          "attached_condition": "(`betaatif_store`.`gp`.`group_id` in (54,51,48,47,46,45,44,43,39,38,37,36,34,32,31,30,29,28,8,9,10,11,12,13,14,16,17,18,19,20,21,6,3,59))"
        }
      },
      {
        "table": {
          "table_name": "gpf",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY",
            "idx_group_id"
          ],
          "key": "idx_group_id",
          "used_key_parts": [
            "group_id"
          ],
          "key_length": "3",
          "ref": [
            "betaatif_store.gp.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 116,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "29.00",
            "eval_cost": "11.60",
            "prefix_cost": "60.22",
            "data_read_per_join": "11K"
          },
          "used_columns": [
            "feature_id",
            "group_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "pfv",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY",
            "fl",
            "lang_code",
            "product_id",
            "fpl",
            "idx_product_feature_variant_id"
          ],
          "key": "fpl",
          "used_key_parts": [
            "feature_id",
            "product_id",
            "lang_code"
          ],
          "key_length": "12",
          "ref": [
            "betaatif_store.gpf.feature_id",
            "betaatif_store.gp.product_id",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 116,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "29.00",
            "eval_cost": "11.60",
            "prefix_cost": "100.82",
            "data_read_per_join": "89K"
          },
          "used_columns": [
            "feature_id",
            "product_id",
            "variant_id",
            "lang_code"
          ]
        }
      }
    ]
  }
}

Result

feature_id product_id variant_id group_id
2 124 12 3
6 214 58 59
6 216 57 59
6 217 53 59
2 378 8 3
2 379 9 3
2 391 8 6
2 393 12 6
2 394 9 6
2 401 9 8
2 402 6 9
2 404 9 9
2 406 6 10
2 408 9 10
2 409 6 11
2 411 9 11
2 412 6 12
2 414 9 12
2 415 6 13
2 417 9 13
2 418 6 14
2 420 9 14
2 424 6 16
2 426 9 16
2 427 6 17
2 429 9 17
2 430 6 18
2 432 9 18
2 433 6 19
2 435 9 19
2 436 6 20
2 438 9 20
2 439 6 21
2 441 9 21
2 442 7 21
2 443 7 20
2 444 7 19
2 445 7 18
2 446 7 17
2 447 7 16
2 448 7 14
2 449 7 13
2 450 7 12
2 451 7 11
2 452 7 10
2 453 7 9
2 454 6 8
2 455 7 8
2 480 6 28
2 481 7 28
2 482 9 28
2 483 11 28
2 484 6 29
2 485 7 29
2 486 9 29
2 487 11 29
2 488 6 30
2 489 7 30
2 490 9 30
2 491 11 30
2 492 6 31
2 493 7 31
2 494 9 31
2 495 11 31
2 496 6 32
2 497 7 32
2 498 9 32
2 499 11 32
2 504 6 34
2 505 7 34
2 506 9 34
2 507 12 34
2 512 6 36
2 513 7 36
2 514 9 36
2 515 12 36
2 516 6 37
2 517 7 37
2 518 9 37
2 519 12 37
2 520 6 38
2 521 7 38
2 522 9 38
2 523 12 38
2 524 6 39
2 525 7 39
2 526 9 39
2 527 12 39
2 540 6 43
2 541 7 43
2 542 9 43
2 543 12 43
2 544 6 44
2 545 7 44
2 546 9 44
2 547 12 44
2 548 6 45
2 549 7 45
2 550 9 45
2 551 12 45
2 552 6 46
2 553 7 46
2 554 9 46
2 555 11 46
2 556 6 47
2 557 7 47
2 558 9 47
2 559 11 47
2 560 6 48
2 561 7 48
2 562 9 48
2 563 11 48
2 572 6 51
2 573 7 51
2 574 9 51
2 575 11 51
2 584 6 54
2 585 7 54
2 586 9 54
2 587 12 54