Do not obtain a smog inspection in another state; it will not be valid here. Unless your vehicle is in Nevada or Mexico, you will not need a smog inspection in order to complete your BMW 323i's registration.
Simply fill out and sign DMV's "Statement of Facts" form explaining that your BMW 323i is out of state and the registration tags will be mailed to wherever the car is currently located. You can obtain a "Statement of Facts" form by calling the California DMV at (800)777-0133 or online.