UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'R9oN28JrT9+Rf5Uv0Ieq64V0owQAfu08nOjEQPhY048=' 
WHERE 
  key_id = '7ea300c30d9a1ceed7cb59abac6603ff98c86158c46cd3ebf3ab93c08f576ab9' 
  AND (
    token = 'R9oN28JrT9+Rf5Uv0Ieq64V0owQAfu08nOjEQPhY048=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031