By improving the efficiency of wireless power transfer (WPT), wireless powered communication networks (WPCNs) are receiving increasing attention. WPCN provides untethered mobility and prolongs the network lifetime by eliminating the need for repetitive charging and replacement of the battery. In this paper, we consider a cognitive WPCN in which wireless powered secondary users (SUs) opportunistically exploit the spectrum licensed to the primary users (PUs). Each SU is associated with a power beacon (PB) node which is responsible for charging the corresponding SU and receiving its data over different frequency bands. SUs have unsaturated data traffic and can transmit if they are out of any guard zone which is defined around active PUs to prevent strong interference. Using tools from stochastic geometry and queueing theory, we characterize the effects of the randomness in data and energy availability of SUs on the interference among PUs and SUs. Then, we derive the service time distribution, mean waiting time, and queue stability criterion for a typical SU, as well as the outage probability of a typical PU. Finally, through extensive simulations, the analytical results are evaluated and the effects of different parameters on the network performance are studied.