A boy from Australia's remote far north spent six hours stuck in the first vending machine he had ever seen.