We cannot keep the law until after God's love for us produces love for God in us. Walter Marshall explains:
The duties of the law are of such a nature, that they cannot possibly be performed while there is wholly an aversion or mere indifferency of the heart to the performance of them, and no good inclination and propensity towards the practice of them: because the chief of all the commandments is to love the Lord with our whole heart, might, and soul; to love everything that is in him; to love his will, and all his ways, and to like them as good. And all duties must be influenced in their performance, by this love: we must delight to do the will of God; it must be sweeter to us than the honey or honeycomb (Ps. xl. 8; Job xxxiii. 12; Ps. lxiii. 1: cxix.20 and xix. 10). And this love, liking, delight, longing, thirsting, sweet relishing, must be continued to the end; and the first indeliberate motion of lust must be regulated by love to God and our neighbour; and sin must be lusted against (Gal. v. 17), and abhorred (Ps. xxxci.4) (The Gospel Mystery of Sanctification, p. 12).