SELECT 
  a.variant_id, 
  a.option_id, 
  a.position, 
  a.modifier, 
  a.modifier_type, 
  a.weight_modifier, 
  a.weight_modifier_type, 
  a.point_modifier, 
  a.point_modifier_type, 
  b.variant_name, 
  IF(
    shared_option_variants.variant_id IS NOT NULL, 
    shared_option_variants.modifier, 
    a.modifier
  ) as modifier, 
  IF(
    shared_option_variants.variant_id IS NOT NULL, 
    shared_option_variants.modifier_type, 
    a.modifier_type
  ) as modifier_type 
FROM 
  cscart_product_option_variants as a 
  LEFT JOIN cscart_product_option_variants_descriptions as b ON a.variant_id = b.variant_id 
  AND b.lang_code = 'da' 
  LEFT JOIN cscart_ult_product_option_variants shared_option_variants ON shared_option_variants.variant_id = a.variant_id 
  AND shared_option_variants.company_id = 1 
WHERE 
  a.option_id IN (
    330, 248, 334, 335, 253, 331, 513, 514, 
    236, 372, 430, 488, 213, 349, 407, 465, 
    245, 381, 439, 497, 230, 366, 424, 482, 
    250, 385, 443, 501, 212, 348, 406, 464, 
    2843, 2844, 2845, 2846, 2851, 2849, 
    2850, 2853, 4171, 2852, 4170, 4169, 
    2854, 149, 336, 337, 338, 2838, 2839, 
    2840, 2841, 4155, 332, 4166, 254, 388, 
    446, 504, 242, 378, 436, 494, 222, 358, 
    416, 474, 234, 370, 428, 486, 260, 395, 
    453, 511, 221, 357, 415, 473, 223, 359, 
    417, 475, 224, 360, 418, 476, 226, 362, 
    420, 478, 227, 363, 421, 479, 228, 364, 
    422, 480, 229, 365, 423, 481
  ) 
  AND a.status = 'A' 
ORDER BY 
  a.position, 
  a.variant_id

Query time 0.00337

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "725.41"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "239.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "shared_option_variants",
            "access_type": "system",
            "possible_keys": [
              "PRIMARY",
              "company_id"
            ],
            "rows_examined_per_scan": 0,
            "rows_produced_per_join": 1,
            "filtered": "0.00",
            "const_row_not_found": true,
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "0.20",
              "prefix_cost": "0.00",
              "data_read_per_join": "24"
            },
            "used_columns": [
              "variant_id",
              "company_id",
              "modifier",
              "modifier_type"
            ]
          }
        },
        {
          "table": {
            "table_name": "a",
            "access_type": "range",
            "possible_keys": [
              "status",
              "option_id",
              "option_id_2"
            ],
            "key": "option_id",
            "used_key_parts": [
              "option_id",
              "status"
            ],
            "key_length": "6",
            "rows_examined_per_scan": 239,
            "rows_produced_per_join": 239,
            "filtered": "100.00",
            "index_condition": "((`eshopuga_upgr_4122`.`a`.`option_id` in (330,248,334,335,253,331,513,514,236,372,430,488,213,349,407,465,245,381,439,497,230,366,424,482,250,385,443,501,212,348,406,464,2843,2844,2845,2846,2851,2849,2850,2853,4171,2852,4170,4169,2854,149,336,337,338,2838,2839,2840,2841,4155,332,4166,254,388,446,504,242,378,436,494,222,358,416,474,234,370,428,486,260,395,453,511,221,357,415,473,223,359,417,475,224,360,418,476,226,362,420,478,227,363,421,479,228,364,422,480,229,365,423,481)) and (`eshopuga_upgr_4122`.`a`.`status` = 'A'))",
            "cost_info": {
              "read_cost": "390.81",
              "eval_cost": "47.80",
              "prefix_cost": "438.61",
              "data_read_per_join": "11K"
            },
            "used_columns": [
              "variant_id",
              "option_id",
              "position",
              "modifier",
              "modifier_type",
              "weight_modifier",
              "weight_modifier_type",
              "point_modifier",
              "point_modifier_type",
              "status"
            ]
          }
        },
        {
          "table": {
            "table_name": "b",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "variant_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "eshopuga_upgr_4122.a.variant_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 239,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.00",
              "eval_cost": "47.80",
              "prefix_cost": "486.41",
              "data_read_per_join": "182K"
            },
            "used_columns": [
              "variant_id",
              "lang_code",
              "variant_name"
            ]
          }
        }
      ]
    }
  }
}

Result

variant_id option_id position modifier modifier_type weight_modifier weight_modifier_type point_modifier point_modifier_type variant_name
744 330 0 0.000 A 0.000 A 0.000 A
746 331 0 0.000 A 0.000 A 0.000 A
748 332 0 0.000 A 0.000 A 0.000 A
750 334 0 0.000 A 0.000 A 0.000 A
752 336 0 0.000 A 0.000 A 0.000 A
754 337 0 0.000 A 0.000 A 0.000 A
774 348 0 0.000 A 0.000 A 0.000 A
776 349 0 0.000 A 0.000 A 0.000 A
792 357 0 0.000 A 0.000 A 0.000 A
794 358 0 0.000 A 0.000 A 0.000 A
796 359 0 0.000 A 0.000 A 0.000 A
798 360 0 0.000 A 0.000 A 0.000 A
802 362 0 0.000 A 0.000 A 0.000 A
804 363 0 0.000 A 0.000 A 0.000 A
806 364 0 0.000 A 0.000 A 0.000 A
808 365 0 0.000 A 0.000 A 0.000 A
810 366 0 0.000 A 0.000 A 0.000 A
818 370 0 0.000 A 0.000 A 0.000 A
822 372 0 0.000 A 0.000 A 0.000 A
834 378 0 0.000 A 0.000 A 0.000 A
840 381 0 0.000 A 0.000 A 0.000 A
848 385 0 0.000 A 0.000 A 0.000 A
854 388 0 0.000 A 0.000 A 0.000 A
868 395 0 0.000 A 0.000 A 0.000 A
890 406 0 0.000 A 0.000 A 0.000 A
892 407 0 0.000 A 0.000 A 0.000 A
908 415 0 0.000 A 0.000 A 0.000 A
910 416 0 0.000 A 0.000 A 0.000 A
912 417 0 0.000 A 0.000 A 0.000 A
914 418 0 0.000 A 0.000 A 0.000 A
918 420 0 0.000 A 0.000 A 0.000 A
920 421 0 0.000 A 0.000 A 0.000 A
922 422 0 0.000 A 0.000 A 0.000 A
924 423 0 0.000 A 0.000 A 0.000 A
926 424 0 0.000 A 0.000 A 0.000 A
934 428 0 0.000 A 0.000 A 0.000 A
938 430 0 0.000 A 0.000 A 0.000 A
950 436 0 0.000 A 0.000 A 0.000 A
956 439 0 0.000 A 0.000 A 0.000 A
964 443 0 0.000 A 0.000 A 0.000 A
970 446 0 0.000 A 0.000 A 0.000 A
984 453 0 0.000 A 0.000 A 0.000 A
988 513 0 0.000 A 0.000 A 0.000 A
2547 2839 0 0.000 A 0.000 A 0.000 A
2549 2840 0 0.000 A 0.000 A 0.000 A
2551 2843 0 0.000 A 0.000 A 0.000 A
2553 2844 0 0.000 A 0.000 A 0.000 A
2555 2845 0 0.000 A 0.000 A 0.000 A
2557 2846 0 0.000 A 0.000 A 0.000 A
2576 2852 0 0.000 A 0.000 A 0.000 A
3251 2851 0 0.000 A 0.000 A 0.000 A None
3252 2849 0 0.000 A 0.000 A 0.000 A None
3253 2850 0 0.000 A 0.000 A 0.000 A None
3430 4169 0 0.000 A 0.000 A 0.000 A Christmas
3431 4169 0 0.000 A 0.000 A 0.000 A Anniversary
3432 4169 0 0.000 A 0.000 A 0.000 A Birthday
3433 4169 0 0.000 A 0.000 A 0.000 A Labor Day
3434 4169 0 0.000 A 0.000 A 0.000 A Business Gift
3435 4169 0 0.000 A 0.000 A 0.000 A Congratulations
3436 4169 0 0.000 A 0.000 A 0.000 A Funeral
3437 4169 0 0.000 A 0.000 A 0.000 A Get Well
3438 4169 0 0.000 A 0.000 A 0.000 A Housewarming
3439 4169 0 0.000 A 0.000 A 0.000 A I'm Sorry
3440 4169 0 0.000 A 0.000 A 0.000 A Just Because
3441 4169 0 0.000 A 0.000 A 0.000 A Love & Romance
3442 4169 0 0.000 A 0.000 A 0.000 A Thanksgiving
3443 4169 0 0.000 A 0.000 A 0.000 A Other
3444 4170 0 0.000 A 0.000 A 0.000 A Girlfriend/Wife
3445 4170 0 0.000 A 0.000 A 0.000 A Mom
3446 4170 0 0.000 A 0.000 A 0.000 A Grandmother
3447 4170 0 0.000 A 0.000 A 0.000 A Daughter
3448 4170 0 0.000 A 0.000 A 0.000 A Dad/Grandfather
3449 4170 0 0.000 A 0.000 A 0.000 A Boyfriend/Husband
3450 4170 0 0.000 A 0.000 A 0.000 A Co-Worker
3451 4170 0 0.000 A 0.000 A 0.000 A Friend
3452 4170 0 0.000 A 0.000 A 0.000 A Other
3453 4171 0 0.000 A 0.000 A 0.000 A None
3454 4171 0 3.000 A 0.000 A 0.000 A Cadbury Bar (1 Piece)
3455 4171 0 22.000 A 0.000 A 0.000 A Cadbury Box (8 Pieces)
3456 4171 0 34.000 A 0.000 A 0.000 A Cadbury Box (12 Pieces)
3457 4171 0 18.000 A 0.000 A 0.000 A Lindt Milk Chocolate
3458 4171 0 5.590 A 0.000 A 0.000 A Lindt Dark Sea Salt
743 330 1 9.000 A 0.000 A 0.000 A
745 331 1 9.000 A 0.000 A 0.000 A
747 332 1 2.000 A 0.000 A 0.000 A
749 334 1 2.000 A 0.000 A 0.000 A
751 336 1 9.000 A 0.000 A 0.000 A
753 337 1 2.000 A 0.000 A 0.000 A
773 348 1 9.000 A 0.000 A 0.000 A
775 349 1 9.000 A 0.000 A 0.000 A
791 357 1 9.000 A 0.000 A 0.000 A
793 358 1 9.000 A 0.000 A 0.000 A
795 359 1 9.000 A 0.000 A 0.000 A
797 360 1 9.000 A 0.000 A 0.000 A
801 362 1 9.000 A 0.000 A 0.000 A
803 363 1 9.000 A 0.000 A 0.000 A
805 364 1 9.000 A 0.000 A 0.000 A
807 365 1 9.000 A 0.000 A 0.000 A
809 366 1 9.000 A 0.000 A 0.000 A
817 370 1 9.000 A 0.000 A 0.000 A
821 372 1 9.000 A 0.000 A 0.000 A
833 378 1 9.000 A 0.000 A 0.000 A
839 381 1 9.000 A 0.000 A 0.000 A
847 385 1 9.000 A 0.000 A 0.000 A
853 388 1 9.000 A 0.000 A 0.000 A
867 395 1 9.000 A 0.000 A 0.000 A
889 406 1 2.000 A 0.000 A 0.000 A
891 407 1 2.000 A 0.000 A 0.000 A
907 415 1 2.000 A 0.000 A 0.000 A
909 416 1 2.000 A 0.000 A 0.000 A
911 417 1 2.000 A 0.000 A 0.000 A
913 418 1 2.000 A 0.000 A 0.000 A
917 420 1 2.000 A 0.000 A 0.000 A
919 421 1 2.000 A 0.000 A 0.000 A
921 422 1 2.000 A 0.000 A 0.000 A
923 423 1 2.000 A 0.000 A 0.000 A
925 424 1 2.000 A 0.000 A 0.000 A
933 428 1 2.000 A 0.000 A 0.000 A
937 430 1 2.000 A 0.000 A 0.000 A
949 436 1 2.000 A 0.000 A 0.000 A
955 439 1 2.000 A 0.000 A 0.000 A
963 443 1 2.000 A 0.000 A 0.000 A
969 446 1 2.000 A 0.000 A 0.000 A
983 453 1 2.000 A 0.000 A 0.000 A
987 513 1 2.000 A 0.000 A 0.000 A
2546 2839 1 9.000 A 0.000 A 0.000 A
2548 2840 1 2.000 A 0.000 A 0.000 A
2550 2843 1 3.000 A 0.000 A 0.000 A
2552 2844 1 3.000 A 0.000 A 0.000 A
2554 2845 1 2.000 A 0.000 A 0.000 A
2556 2846 1 3.000 A 0.000 A 0.000 A
2564 2849 1 1.000 A 0.000 A 0.000 A Chrysanthemum Spray (Green)
2571 2850 1 3.000 A 0.000 A 0.000 A Germini (Yellow)
2574 2851 1 3.000 A 0.000 A 0.000 A Lily Calla (White)
2575 2852 1 9.000 A 0.000 A 0.000 A
2565 2849 2 2.000 A 0.000 A 0.000 A Aspidistra Leaf
2570 2850 2 3.000 A 0.000 A 0.000 A Germini (Pink)
2572 2851 2 3.000 A 0.000 A 0.000 A Lily Asiatic (White)
2562 2849 3 1.000 A 0.000 A 0.000 A Gypsophila (white)
2569 2850 3 3.000 A 0.000 A 0.000 A Germini (Peach)
2573 2851 3 3.000 A 0.000 A 0.000 A Lily Asiatic(Pink)
2563 2849 4 1.000 A 0.000 A 0.000 A Chrysanthemum Spray (White)
2568 2850 4 3.000 A 0.000 A 0.000 A Germini (Orange)
2567 2850 5 3.000 A 0.000 A 0.000 A Germini (Cerise)
2566 2850 6 3.000 A 0.000 A 0.000 A Germini (White)