UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'M3nnRmxq3Ji0PTKGg0qRuZmQgRlCzw6kbQZjAf8TH8o=' 
WHERE 
  key_id = 'ea276c650aba767b5c85bdc019d0d3d8961b524b1957ef7f9c6a79c6a0ccd217' 
  AND (
    token = 'M3nnRmxq3Ji0PTKGg0qRuZmQgRlCzw6kbQZjAf8TH8o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053