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 (2402)

Query time 0.00077

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1.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": "const",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "variant_id"
          ],
          "key_length": "3",
          "ref": [
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.00",
            "eval_cost": "0.20",
            "prefix_cost": "0.00",
            "data_read_per_join": "48"
          },
          "used_columns": [
            "variant_id",
            "modifier",
            "modifier_type"
          ]
        }
      }
    ]
  }
}

Result

modifier modifier_type variant_id
0.000 A 2402