UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0bHKDKaU2b0riCzXjdLGT/PAIwNl9xDmLjCzKRKFOj8=' 
WHERE 
  key_id = '68cd90ec7f0aebaf319e930977e5d3d363b5c517e3027fdf0af9101c8a6ea369' 
  AND (
    token = '0bHKDKaU2b0riCzXjdLGT/PAIwNl9xDmLjCzKRKFOj8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035