Those two steps are in fact executed one before each other so you shouldn't see any race condition behavior.
However, this value is in fact JSON, as you have it, so I'm wondering if you're occasionally getting a parse error based on what the time is, due to a lack of quoting.
The better way to use this module is like so:
ec2_key:
key_name: "{{ ssh_key_name }}"
# all of the arguments here...
instance_tags:
cluster_id: "{{ timestamp.stdout }}"
Which may help. I'd try it and see.
Using the complex arguments form eliminates the need to have the JSON string.