If you would like to add latexmk as an export option in Lyx, here are the two basic steps to do in Tools -> Options.
1) In File Handling -> File Format, hit "New" and then put in these options, then "Apply".
2) Then in File Handling -> Converter, click on any existing converter, change the options to the below, and then click "Add", then "Save".

If you are on Windows, then you might have problems with Perl versions (Lyx has one, MiKTeK another). Initially, I was getting that perl couldn't find File::Glob in @INC when latexmk was run. Turns out that Lyx was running it's own version of perl 5.18.2 and had @INC set to just the Lyx/lib (which oddly did have File/Glob.pm). I installed Strawberry Perl same version (needed that!) then set the PERL5LIB to the Strawberry perl folder. Then it works fine.
This was on LyX 2.1.2, updated MiKTeX, and Windows 8.