Method for operating a vending machine and vending system