You can try...
Code:
INSERT INTO rank_players (...) ON DUPLICATE KEY UPDATE (...)
OR
Code:
REPLACE INTO rank_players (...)
Otherwise you'll just have to do a select query first, and then based on the results of the select query change your insert query.
EDIT:
Just
found this...
Code:
INSERT INTO Timeline (name, ts)
SELECT @name, @ts
WHERE NOT EXISTS (SELECT 1 FROM Timeline WHERE name=@name AND ts = @ts);
It's worth a try.