We propose a novel random access (RA) protocol that accounts for the network traffic in mixed URLLC-mMTC scenarios. By considering an IoT environment under high mMTC traffic demand, we model the traffic of each service using realistic statistical models, with the mMTC and URLLC use modes presenting a long-term traffic regularity. A long-short term memory (LSTM) neural network (NN) is used as a network traffic predictor, enabling a traffic-aware resource slicing (RS) scheme, aided by a contention access control barring (ACB)-based procedure. The proposed method combines a grant-based RA scheme, where it is introduced an intermediate step in grant-free RA, to deal with collisions. The protocol presents a small overhead, supporting a higher number of packets in a frame thanks to the congestion alleviation enabled by the ACB procedure. Numerical results show the effectiveness in combining the three procedures in terms of accuracy for traffic prediction, resource utilization and channel loading for RS, and increased throughput.% for the proposed LSTM-ACB-based RA protocol. The comparison with a grant-free benchmark reveals substantial improvement in system performance.