UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tpoIZNRqNcOBwDiLo0dTkmwAY7VwIJzf84DR/90ugy0=' 
WHERE 
  key_id = '72a60968aa1cc169ff2d44397f72d8edda6de0b34597c540f9d13226fbfe59fd' 
  AND (
    token = 'tpoIZNRqNcOBwDiLo0dTkmwAY7VwIJzf84DR/90ugy0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022