A search is presented for pair production of the standard model Higgs boson using data from proton-proton collisions at a centre-of-mass energy of 13 TeV, collected by the CMS experiment at the CERN LHC in 2016, and corresponding to an integrated luminosity of 35.9 fb−1. The final state consists of two b quark-antiquark pairs. The search is conducted in the region of phase space where one pair is highly Lorentz-boosted and is reconstructed as a single large-area jet, and the other pair is resolved and is reconstructed using two b-tagged jets. The results are obtained by combining this analysis with another from CMS looking for events with two large jets. Limits are set on the product of the cross sections and branching fractions for narrow bulk gravitons and radions in warped extradimensional models having a mass in the range 750-3000 GeV. The resulting observed and expected upper limits on the non-resonant Higgs boson pair production cross section correspond to 179 and 114 times the standard model value, respectively, at 95% confidence level. The existence of anomalous Higgs boson couplings is also investigated and limits are set on the non-resonant Higgs boson pair production cross sections for representative coupling values.[Figure not available: see fulltext.].