UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FRaq8j3mRi48nmvHcJLDdJKndgHUsHAiRmFGuyRT07U=' 
WHERE 
  key_id = '910da8c7f98dbf3fe9998fd560d9b2526d59c817d4fce0f85dd98e7a4fa74a67' 
  AND (
    token = 'FRaq8j3mRi48nmvHcJLDdJKndgHUsHAiRmFGuyRT07U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043