Interesting discussion this.
"Exesti" means lawful, and can apply to any legal code.
The question then becomes what legal code was Jesus invoking when he used the term. Luke 6: 1-5, and Mark 2: 23-28, indicate that Jesus was invoking a higher Law, as he confirms that taking the shewbread was contrary to Mosaic Law.
A number of God's laws appear to conflict with each other, such as what happened when someone wanted to obey the command to circumcise their baby on the 8th day and it happened to fall on the Sabbath. However, it was not the case that they were forced to sin by breaking one of the two commands no matter what they chose to do, but that one of the commands was never intended to prevent the other from being obeyed. This is why priests were held innocent for performing their duties on the Sabbath or why David and his men were held innocent for eating the shewbread.
The group of Pharisees had seen that it is unlawful to work on the Sabbath and that healing was work, so they had reason that it was therefore unlawful to heal on the Sabbath. However, we are also commanded to love our neighbor and it would not be loving our neighbor to refuse to heal someone who needed our help. In Matthew 22:36-40, Jesus summarized the Law as being about how to love God and our neighbor and said that all of the other commandments hang on those two commandments. In other words, the other commandments are intended as examples of how we should love our our neighbor and were not intended to be used as an excuse to prevent us from obeying the greatest two commandments, which is why is why Jesus ruled that it was lawful to heal on the Sabbath.
Given that David was of the Melchezedek priesthood also, it therefore confirms that he was invoking the Law of the Spirit, (new covenant Law as it were), over Mosaic Law.
Again the Spirit is not in disagreement the Father about which laws we should follow, so they do not have different sets of laws. The distinction between the spirit of the law and the letter of the law is reflected in modern discussions of law enforcement and is not in regard to following different sets of laws, but in regard to the manner in which someone obeys the laws with respect to the intention behind them. For example:
Leviticus 19:12 “‘Do not swear falsely by my name and so profane the name of your God. I am the Lord.
Someone who was focused on obeying the spirit of this law would understand that its intent is for us not to swear falsely, whereas someone who was focused on obeying the letter of this law exactly how it was written would understand that we can swear falsely just as long as we don't do so in God's name, which incidentally is the heart of what Jesus was criticizing the Pharisees for doing in Matthew 23:16-22.
However, even if someone were outwardly obeying the Law correctly, they can still miss its inward intent. Paul said that the Law is spiritual (Romans 7:14), which means that it has always been intended to instruct deeper spiritual principles by which to live by, of which the listed laws are just examples, and which are the character traits of God, such as holiness, righteousness, goodness (Romans 7:12), justice, mercy, faithfulness, (Matthew 23:23), love, joy, peace, patience, kindness, gentleness, and self-control (Exodus 34:6-7, Galatians 5:21-22). There are many verses that describe the Mosaic Law as being instructions for how to walk in His ways, such as Deuteronomy 10:12-13, Joshua 22:5, Isaiah 2:2-3, and Psalms 103:7), so again it about teaching us to express God's character traits and to thereby how to grow in a relationship with Him. As such, obeying the Law according to the letter leads to death just as assuredly as refusing to submit to it because it undermines its intent both in regard to what it is teaching us to do and why it is teaching us to do it.
The point is that Christ was offered not in the earthly temple, but in the heavenly temple. He was not sacrificed under the Law, which is a shadow of the real thing.
Hebrews 9:11 But when Christ came as a high priest of the good things that have come, then through the greater and perfect tent (not made with hands, that is, not of this creation), 12 he entered once for all into the Holy Place, not with the blood of goats and calves, but with his own blood, thus obtaining eternal redemption. 13 For if the blood of goats and bulls, with the sprinkling of the ashes of a heifer, sanctifies those who have been defiled so that their flesh is purified, 14 how much more will the blood of Christ, who through the eternal Spirit offered himself without blemish to God, purify our conscience from dead works to worship the living God!
And as Paul makes clear, Jesus was without blemish in the eyes of God rather than the old code. "This is my son in whom I am well-pleased".
The bottom line is that Jesus was found guilty, highly imperfect that is, under the Law. He was charged with blasphemy, as well as the lesser charges of sedition, wishing to destroy the temple, and lawlessness, breaking the sabbath.
According to those who enforced the Law he was the most sinful man ever, according to God, he was God.
God does not have two different standards of righteousness. Jesus being sinless according to God's standard of righteousness is core Christian doctrine, so while Jesus was accused of transgressing that standard, he was innocent. So while Jesus was charged with blasphemy, if Jesus was God, then he had not committed blasphemy. In Matthew 26:59-60, it says that they were looking for false testimony against Jesus and brought forth false witnesses, which indicates that he did not do what he was accused of doing. If he had broken the Sabbath, then they wouldn't have needed false witnesses.