first, it helps to get the texts in front of us:
Καὶ εἶπον οἱ ἀπόστολοι τῷ Κυρίῳ, Πρόσθες ἡμῖν πίστιν.
6 εἶπε δὲ ὁ Κύριος,
Εἰ εἴχετε πίστιν ὡς κόκκον σινάπεως,
ἐλέγετε ἂν τῇ συκαμίνῳ ταύτῃ,
Ἐκριζώθητι, καὶ φυτεύθητι ἐν τῇ θαλάσσῃ· καὶ ὑπήκουσεν ἂν ὑμῖν.
Διατί ἡμεῖς οὐκ ἠδυνήθημεν ἐκβαλεῖν αὐτό;
20 ὁ δὲ Ἰησοῦς εἶπεν αὐτοῖς,
Διὰ τὴν ἀπιστίαν ὑμῶν. ἀμὴν γὰρ λέγω ὑμῖν,
ἐὰν ἔχητε πίστιν ὡς κόκκον σινάπεως,
ἐρεῖτε τῷ ὄρει τούτῳ,
Μετάβηθι ἐντεῦθεν ἐκεῖ, καὶ μεταβήσεται·
καὶ οὐδὲν ἀδυνατήσει ὑμῖν.
then, we need to deconstruct the grammar terminology (first-class protasis) into Greek categories:
Luke has an 'if' word ει with a present tense ἔχετε, which is quite generic
Matthew has a modified 'if' word ἐὰν with an open-ended subjunctive ἔχητε, something a little more explicitly hypothetical
Luke follows his 'if-clause' with an imperfect, normally a past tense. However, with conditionals the shift to a past tense allows one to contrast a potential with what actually was known to not happen. The potential can be called contrafactual. The ἄν particle signals the potentiality and the past tense provides the contrafactual context.
Matthew follows his more hypothetical if-clause with a future tense in a modal context (this is what you should do//will do//are able to do). So Matthew's statement looks at the possibility, while Luke's statement looks at what didn't happen.
Then we must also ask what would Jesus have said in Hebrew (humor me here, this was the preferred language of Jewish teachers in the first century).
Sometimes we can find ambiguities that explain multiple translation strategies in Greek.
אם יש לכם אמונה כגרגיר חרדל
תאמר לשקמה הזאת
העקרי והנטעי בים
אם יש לכם אמונה כגרגיר חרדל
תאמר להר הזה
העתק מזה שמה
(This reminds one of the story in Baba Metsia 59b:On that day R. Eliezer brought forward every imaginable argument, but the Sages did not accept any of them. Finally he said to them: "If the Halakhah (religious law) is in accordance with me, let this carob tree prove it!" Sure enough the carob tree immediately uprooted itself and moved one hundred cubits, and some say 400 cubits, from its place. "No proof can be brought from a carob tree," they retorted.)
The point in this? Hebrew doesn't have a subjunctive, or even a verb for "have". Someone repeating the saying(s) in Greek (yes, it is possible that it was said more than once on different occasions) must restructure the verbs and make choices that were not necessary in Hebrew. From Luke's present and Matthew's subjunctive, we may assume that a past tense structure was not used in a Hebrew source. Luke's choices on the second part (apodosis) make it explicit that this tree-removal didn't happen, while Matthew's choices point to the possibility. However, I suspect that Luke received the Greek text with the tense and particle choices already specified and that he left them mildly incongruent rather than tighten them up into a properly formed contrafactual.
Several items make the phrase in Luke likely to be a received source and difficult to emend. First, 'planting a tree' in the ocean is strange and hardly a natural or easy replacement for Luke to have added. The choice of the Greek word and my Hebrew reconstruction reflect the LXX and Jewish Greek. The Greek is more likely a berry-tree, mulberry ἡ συκάμινος, but this translates שקמה, the sycamore fig tree in the Hebrew Bible. (These were common in the Shfela and a nice example stands today inside the entrance to Ashkelon national park on the coast.) As mentioned, the Lukan text starts with a generic "real" condition, and ends with an "unreal" condition. So was the author of Luke 1:1-4 and Acts 16-28 capable of cleaning up the text? Of course.
So now the question, did he introduce the incongruities, or accept them from his source? I go with accepting a source as more probable. And thus, a Hebrew--Greek interface helps to explain Luke's Greek here.
PS: full disclosure-- I recognize that Luke's Greek is schizophrenic, up and down, in style, not the 'polished Greek' with which he is often associated in introductions. Also, I recognize that Luke was not "Septuagintalizing", though NT scholarship continues to approach him within that myth. As a modus operandi Luke generally worked toward smoothing out the Greek, but that process did not remove all of the wrinkles. With Luke, what you see is what you get, and the background in complicated.