Eight years after your question, MariaDB added the exact syntax you want in version 10.5.2: https://mariadb.com/kb/en/rename-table/
IF EXISTS
MariaDB starting with 10.5.2
If this is directive is used, one will not get an error if the table to be renamed doesn't exist.