How do I add custom keywords in the URL? For a sake of SEO, I need to be able to dynamically pass random keywords to the URL. For example, instead of the classic variable=value couples in a query (e.g. /my-node-title?selected=random-seo-keyword), I need to use a good-looking path like /my-node-title/random-seo-keyword, where my-node-title is a URL / path alias of node/xxx but random-seo-keyword does not exist in the structure and may not be predefined.

Then, on the server I handle and split the URL parts with a script. The only problem is that currently Drupal 7 returns a 404 error in such cases.
You can alter your paths by using hook_url_*_alter() hooks.
Have a look at hook_url_inbound_alter() and hook_url_outbound_alter().