Internet of Things (IoT) based applications and systems are gaining attention in the recent days because of their vast benefits such as efficient utilization of resources, enhanced data collection, improved security, lesser human efforts and reduced time. Security of sensitive data in IoT based fog environments is inevitable to prevent those data to be misused by the attackers. In this study, we present an improved hybrid algorithm termed as HQCP-ABE (Hybrid Quantum key Cipher text Policy Attribute based Encryption with Cipher text update) that integrates highly effective algorithms such as CP-ABE, Quantum key cryptography and cipher text update. The proposed algorithm eliminates the need of costly pairing during decryptions and efficiently performs data encryption, decryption and user authorization. The proposed protocol is demonstrated to be highly efficient in terms of encryption and decryption while compared to other existing methods. It also achieves lesser packet loss, reduced control overheads, reduced computational overhead during encryption and decryption processes, lesser delay, improved security, packet delivery ratio, throughput, network lifetime with limited bandwidth and user privacy. We further considered energy consumption in this study. The proposed HQCP-ABE method is demonstrated using ns3 simulation and compared with existing CP-ABE and PA-CPABE methods.