SELECT 
  a.modifier, 
  a.modifier_type, 
  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, 
  a.variant_id 
FROM 
  cscart_product_option_variants a 
  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 
  1 
  AND a.variant_id IN (2522, 748)

Query time 0.00046

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4.81"
    },
    "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": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "variant_id"
          ],
          "key_length": "3",
          "rows_examined_per_scan": 2,
          "rows_produced_per_join": 2,
          "filtered": "100.00",
          "index_condition": "(`eshopuga_upgr_4122`.`a`.`variant_id` in (2522,748))",
          "cost_info": {
            "read_cost": "4.41",
            "eval_cost": "0.40",
            "prefix_cost": "4.81",
            "data_read_per_join": "96"
          },
          "used_columns": [
            "variant_id",
            "modifier",
            "modifier_type"
          ]
        }
      }
    ]
  }
}

Result

modifier modifier_type variant_id
0.000 A 748
1.000 A 2522